Downloads · 30 days
11
10% of all-time downloads
weirek/Affine-new-2
Affine-new-2 is a text generation model from weirek. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Downloads · 30 days
11
10% of all-time downloads
All-time downloads
109
Public
Parameters
1.7B
20.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.4 GB · 100%
From the Hugging Face model README
Fine-tuned model for Affine subnet
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"weirek/Affine-new-2",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("weirek/Affine-new-2")
# Generate text
messages = [
{"role": "user", "content": "Hello, how are you?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model inherits limitations from its base model and training data. Use responsibly and be aware of potential biases.