Downloads · 30 days
6
3% of all-time downloads
gradients-io-tournaments/qwen2.5-3b-finetune-upwork1
qwen2.5-3b-finetune-upwork1 is a text generation model from gradients-io-tournaments. Use it when you need the model to write or continue text. It is set up for transformers.
This is a full merged checkpoint of the fine-tuned Qwen2.5-3B-Instruct model.
Downloads · 30 days
6
3% of all-time downloads
All-time downloads
197
Public
Parameters
3.1B
6.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
This is a full merged checkpoint of the fine-tuned Qwen2.5-3B-Instruct model.
Qwen/Qwen2.5-3B-InstructQwen2ForCausalLM (36 hidden layers, 16 attention heads, 2 key-value heads)bfloat16import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "gradients-io-tournaments/qwen2.5-3b-finetune-upwork1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
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)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)