File size: 6,959 Bytes
afa04cd bc829ff 84df336 7631032 afa04cd 7631032 afa04cd 7631032 afa04cd 7631032 afa04cd 7631032 afa04cd 7631032 afa04cd 7631032 afa04cd 7631032 afa04cd a115162 afa04cd a115162 afa04cd a115162 afa04cd 7853a8f afa04cd 7853a8f afa04cd 7853a8f afa04cd a1223bc afa04cd a1223bc afa04cd 9a72f93 afa04cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
---
library_name: transformers
tags:
- trl
- sft
datasets:
- nenad1002/quantum_science_research_dataset
language:
- en
metrics:
- rouge
- bertscore
base_model: meta-llama/Meta-Llama-3.1-8B-Instruct
license: mit
---
# Model Card for Model ID
Quantum Research Bot is a chat model fined tuned over the latest research data in quantum science. It contains data from the second half of 2024 making it more accurate than general-purpose models.
## Model Details
### Model Description
- **Developed by:** Nenad Banfic
- **Language(s) (NLP):** English
- **License:** MIT
- **Finetuned from model [optional]:** meta-llama/Meta-Llama-3.1-8B-Instruct
## Uses
You can use the model to ask questions about the latest developments in quantum science. Below are examples of questions that general-purpose models may answer incorrectly or inadequately, but this model should provide accurate responses.
| Question | Expected answer |
|:---------------------|:--------------|
| On top of what platform is TensorKrowch built on and where was it created? | TensorKrowch is built on top of the PyTorch framework and was created at the University of Madrid |
| What algorithms does the quantum FIPS 205 deal with? | The FIPS 205 deals with the stateless hash-based digital signature algorithm (SLH-DSA). |
| What is the variance which you can get with polynomial bond dimension in pure quantum states in one dimensional systems? | The variance that you can get with polynomial bond dimension in pure quantum states in one dimensional systems is as small as ∝ 1 / log N.|
| As if September 2024, how many qubits has the quantum Krylov algorithm been demonstrated on experimentally? | The quantum Krylov algorithm has been demonstrated on up to 56 qubits experimentally.|
| In the analysis of noise effects in controlled-swap gate circuits, what percentage of errors were eliminated with a dephasing error probability of 10% when using two noisy copies of a quantum state? | 67% of errors were eliminated when using two copies of a quantum state with a dephasing error probability of 10%. ,
### Out-of-Scope Use
Although this model should be able to generalize well, the quantum science terminology and context is very complex, so it might struggle with corrent simplification, hence, should not be used in that context.
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Please refer to the instructions for the Meta Instruct models; the principle is the same.
[More Information Needed]
## Training Details
### Training Data
Initially trained on a bit less than 3k entries, it was later expanded t 5k high quality questions and answers to make the best of supervised fine tuning.
The dataset was generated by crawling the https://quantum-journal.org/ site, and passing data into the OpenAI gpt-4-turbo model with various prompts to ensure high quality data generation.
[More Information Needed]
### Training Procedure
Many training procedures were tried alongside with multiple models.
After exensive grid search, supervised fine tuning of Llama 3.1-8B with LORA+ resulted in the best training and evaluation cross entropy.
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed]
- bfloat16 precision
- LORA rank: 8
- LORA alpha: 16
- LORA droput: 0.1
- Unfreezed nodes are attention, MLP, and embeddings
- Optimizer: AdamW
- LR: 1e-4
- LR scheduler: cosine
- NEFT enabled: true
- Batch size: 8
- Number of epochs: 3
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
#### Metrics
Since the fine-tuned model is designed to summarize newly learned data, ROUGE and BERTScore metrics were measured on a sample of 50 manually crafted questions. The reference answers were constructed during the creation of the training and evaluation sets.
Given that GPT-4-turbo was already used in this context, I did not compare my model against it. Instead, I chose to compare it against the following models:
| Metric | quantum-research-bot-v1.0 | Meta-Llama-3.1-8B | gemini-1.5-pro |
|:------------------|:---------------------------|:--------------------|:------------------|
| **BERTScore F1** | 0.5821 | 0.3305 | 0.4982 |
| **ROUGE-1** | 0.6045 | 0.3152 |0.5029 |
| **ROUGE-2**| 0.4098 | 0.1751 | 0.3104 |
| **ROUGE-L**| 0.5809 | 0.2902 | 0.4856 |
[More Information Needed]
### Results
[More Information Needed]
#### Summary
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions are estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** RTX A6000
- **Hours used:** ~20h in total, although most trainings took a bit more than 30 minutes with rare exceptions
- **Cloud Provider:** Runpod
- **Compute Region:** West US
- **Carbon Emitted:** 1.5 kg CO2
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
For most workloads:
1 x RTX A6000
16 vCPU 62 GB RAM
However, when fine tuning `meta-llama/Meta-Llama-3-70B-Instruct` quantization was applied, and I've used 4xA100. Since this did not yield much improvements, and it was very costly, I decided to stick to model with fewer parameters.
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]
## Model Card Authors [optional]
[More Information Needed]
## Model Card Contact
[More Information Needed] |