Downloads · 30 days
11
8% of all-time downloads
d4g0at5h0rty/sage-ml
sage-ml is a text generation model from d4g0at5h0rty. 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
11
8% of all-time downloads
All-time downloads
132
Public
Parameters
3.3B
6.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.7 GB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "d4g0at5h0rty/sage-ml"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
messages = [{"role": "user", "content": "Hello, how are you?"}]
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
)
gen_tokens = model.generate(
input_ids,
max_new_tokens=4096,
do_sample=True,
temperature=0.1,
top_p=0.95
)
print(tokenizer.decode(gen_tokens[0]))