File size: 679 Bytes
5345012 ab1544b 6f8c51d ab1544b 006d01a ab1544b 8b47b8f ab1544b 5345012 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
---
license: apache-2.0
language:
- en
---
# BEE-spoke-data/Mixtral-GQA-400m-v2
## testing code
```python
# !pip install -U -q transformers datasets accelerate sentencepiece
import pprint as pp
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="BEE-spoke-data/Mixtral-GQA-400m-v2",
device_map="auto",
)
pipe.model.config.pad_token_id = pipe.model.config.eos_token_id
prompt = "My favorite movie is Godfather because"
res = pipe(
prompt,
max_new_tokens=256,
top_k=4,
penalty_alpha=0.6,
use_cache=True,
no_repeat_ngram_size=4,
repetition_penalty=1.1,
renormalize_logits=True,
)
pp.pprint(res[0])
``` |