Update README.md
Browse files
README.md
CHANGED
|
@@ -8,6 +8,10 @@ base_model: meta-llama/Meta-Llama-3-8B-Instruct
|
|
| 8 |
|
| 9 |
We are thrilled to present Llama3-KALE-LM-Chem 8B, the newest version of our Llama3-KALE-LM-Chem model, which embodies nearly half a year of innovation.
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
## Benchmarks
|
| 12 |
|
| 13 |
### Open Benchmarks
|
|
@@ -36,3 +40,43 @@ We are thrilled to present Llama3-KALE-LM-Chem 8B, the newest version of our Lla
|
|
| 36 |
| ChemLLM-7B-Chat-1.5-SFT | 50.06 | 49.51 | 85.28 | 38.75 | 38.00 | 26.67 | 28.33 | 31.68 | 33.67 | 42.44 |
|
| 37 |
| OURMODEL | 63.58 | 58.39 | 92.98 | 44.50 | 48.67 | 38.33 | 46.33 | 44.55 | 34.33 | 52.41 |
|
| 38 |
| OURMODELINSTRUCT | 61.33 | 43.44 | 90.30 | 53.62 | 72.67 | 53.67 | 46.00 | 47.03 | 45.00 | 57.01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
We are thrilled to present Llama3-KALE-LM-Chem 8B, the newest version of our Llama3-KALE-LM-Chem model, which embodies nearly half a year of innovation.
|
| 10 |
|
| 11 |
+
## Training Details
|
| 12 |
+
|
| 13 |
+
We have continue pre-trained the model with a large amount of data and post-trained it using supervised fine-tuning.
|
| 14 |
+
|
| 15 |
## Benchmarks
|
| 16 |
|
| 17 |
### Open Benchmarks
|
|
|
|
| 40 |
| ChemLLM-7B-Chat-1.5-SFT | 50.06 | 49.51 | 85.28 | 38.75 | 38.00 | 26.67 | 28.33 | 31.68 | 33.67 | 42.44 |
|
| 41 |
| OURMODEL | 63.58 | 58.39 | 92.98 | 44.50 | 48.67 | 38.33 | 46.33 | 44.55 | 34.33 | 52.41 |
|
| 42 |
| OURMODELINSTRUCT | 61.33 | 43.44 | 90.30 | 53.62 | 72.67 | 53.67 | 46.00 | 47.03 | 45.00 | 57.01 |
|
| 43 |
+
|
| 44 |
+
## Quick Start
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 48 |
+
device = "cuda" # the device to load the model onto
|
| 49 |
+
|
| 50 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 51 |
+
"USTC-KnowledgeComputingLab/Llama3-KALE-LM-Chem-8B",
|
| 52 |
+
torch_dtype="auto",
|
| 53 |
+
device_map="auto"
|
| 54 |
+
)
|
| 55 |
+
tokenizer = AutoTokenizer.from_pretrained("USTC-KnowledgeComputingLab/Llama3-KALE-LM-Chem-8B")
|
| 56 |
+
|
| 57 |
+
prompt = "Give me a short introduction to large language model."
|
| 58 |
+
messages = [
|
| 59 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
| 60 |
+
{"role": "user", "content": prompt}
|
| 61 |
+
]
|
| 62 |
+
text = tokenizer.apply_chat_template(
|
| 63 |
+
messages,
|
| 64 |
+
tokenize=False,
|
| 65 |
+
add_generation_prompt=True
|
| 66 |
+
)
|
| 67 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
| 68 |
+
|
| 69 |
+
generated_ids = model.generate(
|
| 70 |
+
model_inputs.input_ids,
|
| 71 |
+
max_new_tokens=2048
|
| 72 |
+
)
|
| 73 |
+
generated_ids = [
|
| 74 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 75 |
+
]
|
| 76 |
+
|
| 77 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## Citation
|
| 81 |
+
|
| 82 |
+
Will Coming soon....
|