Update README.md
Browse files
README.md
CHANGED
@@ -48,31 +48,6 @@ dtype: float16
|
|
48 |
|
49 |
```
|
50 |
|
51 |
-
``` python
|
52 |
-
|
53 |
-
|
54 |
-
import transformers
|
55 |
-
import torch
|
56 |
-
|
57 |
-
from transformers import AutoTokenizer, MixtralForCausalLM
|
58 |
-
device = "cuda" # the device to load the model onto
|
59 |
-
|
60 |
-
model = "{{ username }}/{{ model_name }}"
|
61 |
-
imodel = MixtralForCausalLM.from_pretrained(model)
|
62 |
-
tokenizer = AutoTokenizer.from_pretrained(model)
|
63 |
-
|
64 |
-
|
65 |
-
inputs = tokenizer(prompt, return_tensors="pt")
|
66 |
-
|
67 |
-
# Generate
|
68 |
-
generate_ids = imodel.generate(inputs.input_ids, max_length=30)
|
69 |
-
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
```
|
74 |
-
|
75 |
-
|
76 |
|
77 |
-WORKING MODEL-No Errors
|
78 |
|
|
|
48 |
|
49 |
```
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-WORKING MODEL-No Errors
|
53 |
|