Downloads · 30 days
17
5% of all-time downloads
serpdotai/sparsetral-16x7B-v1
sparsetral-16x7B-v1 is a text generation model from serpdotai. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
17
5% of all-time downloads
All-time downloads
371
Public
Parameters
7.5B
15 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15 GB · 100%
From the Hugging Face model README
prompt format
### System:\n{system}\n### Human:\n{user}\n### Assistant:\n"
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("serpdotai/sparsetral-16x7B-v1", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("serpdotai/sparsetral-16x7B-v1", device_map="auto", trust_remote_code=True).eval()
inputs = tokenizer('### System:\n\n### Human:\nHow are you?\n### Assistant:\n', return_tensors='pt')
inputs = inputs.to(model.device)
pred = model.generate(**inputs)
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
# I am doing well, thank you.