TromeroResearch
commited on
Commit
•
88f29e5
1
Parent(s):
a5d8c72
Update README.md
Browse files
README.md
CHANGED
@@ -23,25 +23,15 @@ To run this model for yourself:
|
|
23 |
```python
|
24 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
25 |
|
26 |
-
device = "cuda" # the device to load the model onto
|
27 |
-
|
28 |
model = AutoModelForCausalLM.from_pretrained("TromeroResearch/SciMistral-V1")
|
29 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
30 |
-
|
31 |
-
messages = [
|
32 |
-
{"role": "user", "content": "What is your favourite condiment?"},
|
33 |
-
{"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
|
34 |
-
{"role": "user", "content": "Do you have mayonnaise recipes?"}
|
35 |
-
]
|
36 |
|
37 |
-
|
|
|
38 |
|
39 |
-
|
40 |
-
model.to(device)
|
41 |
|
42 |
-
|
43 |
-
decoded = tokenizer.batch_decode(generated_ids)
|
44 |
-
print(decoded[0])
|
45 |
```
|
46 |
|
47 |
|
@@ -78,4 +68,11 @@ And it continues. A much better, more useful and relevant response to someone wh
|
|
78 |
|
79 |
## Hardware
|
80 |
|
81 |
-
4 x Nvidia A6000 GPUs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
```python
|
24 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
25 |
|
|
|
|
|
26 |
model = AutoModelForCausalLM.from_pretrained("TromeroResearch/SciMistral-V1")
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained("TromeroResearch/SciMistral-V1")
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
+
prompt = "This paper seeks to disprove that 1+1=2"
|
30 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to("cuda")
|
31 |
|
32 |
+
output = model.generate(input_ids, max_length=150, num_return_sequences=1, repetition_penalty=1.2, top_k=50, top_p=0.95, temperature=1.0)
|
|
|
33 |
|
34 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
|
|
|
35 |
```
|
36 |
|
37 |
|
|
|
68 |
|
69 |
## Hardware
|
70 |
|
71 |
+
4 x Nvidia A6000 GPUs
|
72 |
+
|
73 |
+
|
74 |
+
## Limitations
|
75 |
+
|
76 |
+
The SciMistral model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance.
|
77 |
+
It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to
|
78 |
+
make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
|