Update README.md
Browse files
README.md
CHANGED
@@ -11,4 +11,40 @@ library_name: transformers
|
|
11 |
---
|
12 |
|
13 |
## Mistral Nemo 12B R1
|
14 |
-

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
## Mistral Nemo 12B R1
|
14 |
+

|
15 |
+
|
16 |
+
Took **96 hours** to finetune on **2x Nvidia RTX A6000** with the following settings:
|
17 |
+
- Batch size: 3
|
18 |
+
- Gradient accumulation steps: 1
|
19 |
+
- Epochs: 1
|
20 |
+
- Learning rate: 1e-4
|
21 |
+
- Warmup ratio: 0.1
|
22 |
+
|
23 |
+
Run the model:
|
24 |
+
```python
|
25 |
+
import torch
|
26 |
+
from transformers import pipeline
|
27 |
+
|
28 |
+
model_id = "CreitinGameplays/Mistral-Nemo-12B-R1-v0.1"
|
29 |
+
|
30 |
+
pipe = pipeline(
|
31 |
+
"text-generation",
|
32 |
+
model=model_id,
|
33 |
+
torch_dtype=torch.bfloat16,
|
34 |
+
device_map="auto"
|
35 |
+
)
|
36 |
+
|
37 |
+
messages = [
|
38 |
+
{"role": "system", "content": "You are a helpful AI assistant."},
|
39 |
+
{"role": "user", "content": "How many r's are in strawberry?"}
|
40 |
+
]
|
41 |
+
|
42 |
+
outputs = pipe(
|
43 |
+
messages,
|
44 |
+
temperature=0.4,
|
45 |
+
repetition_penalty=1.1,
|
46 |
+
max_new_tokens=2048
|
47 |
+
)
|
48 |
+
|
49 |
+
print(outputs[0]["generated_text"][-1])
|
50 |
+
```
|