macadeliccc
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -26,21 +26,16 @@ Opus-Samantha-Llama-3-8B is a SFT model made with [AutoSloth](https://colab.rese
|
|
26 |
## 💻 Usage
|
27 |
|
28 |
```python
|
29 |
-
!pip install -qU transformers
|
30 |
|
31 |
-
|
|
|
32 |
|
33 |
-
|
34 |
-
tokenizer = AutoTokenizer.from_pretrained(model)
|
35 |
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
# Generate a response
|
40 |
-
model = AutoModelForCausalLM.from_pretrained(model)
|
41 |
-
pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
42 |
-
outputs = pipeline(prompt, max_length=50, num_return_sequences=1)
|
43 |
-
print(outputs[0]["generated_text"])
|
44 |
```
|
45 |
|
46 |
<div align="center">
|
|
|
26 |
## 💻 Usage
|
27 |
|
28 |
```python
|
29 |
+
!pip install -qU transformers torch
|
30 |
|
31 |
+
import transformers
|
32 |
+
import torch
|
33 |
|
34 |
+
model_id = "meta-llama/Meta-Llama-3-8B"
|
|
|
35 |
|
36 |
+
pipeline = transformers.pipeline(
|
37 |
+
pipeline("Hey how are you doing today?")
|
38 |
|
|
|
|
|
|
|
|
|
|
|
39 |
```
|
40 |
|
41 |
<div align="center">
|