-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
new modelRequest a new modelRequest a new model
Description
Model description
Stable LM 2 1.6B is a 1.6 billion parameter decoder-only language model pre-trained on 2 trillion tokens of diverse multilingual and code datasets for two epochs.
Model link:
Prerequisites
- The model is supported in Transformers (i.e., listed here)
- The model can be exported to ONNX with Optimum (i.e., listed here)
Additional information
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-1_6b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"stabilityai/stablelm-2-1_6b",
trust_remote_code=True,
torch_dtype="auto",
)
model.cuda()
inputs = tokenizer("The weather is always wonderful", return_tensors="pt").to(model.device)
tokens = model.generate(
**inputs,
max_new_tokens=64,
temperature=0.70,
top_p=0.95,
do_sample=True,
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))Your contribution
I would love to test this model on the Node.js platform, and if possible, I also want to run it on React Native through the Expo SDK
react-native-ONNX
Maxzurek
Metadata
Metadata
Assignees
Labels
new modelRequest a new modelRequest a new model