Downloads · 30 days
0
aiyun123/Qwen2.5-Coder-0.5B-Instruct
Qwen2.5-Coder-0.5B-Instruct is a text generation model from aiyun123. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
此仓库用于记录在 Gensyn Testnet 的 RL Swarm 代码生成任务中的参与与权重版本。基础模型为 Qwen/Qwen2.5-Coder-0.5B-Instruct。
Downloads · 30 days
0
Access
Public
Updated Nov 25, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md1.9 KB · 55%
From the Hugging Face model README
此仓库用于记录在 Gensyn Testnet 的 RL Swarm 代码生成任务中的参与与权重版本。基础模型为 Qwen/Qwen2.5-Coder-0.5B-Instruct。
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "aiyun123/Qwen2.5-Coder-0.5B-Instruct"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto" # 自动选择设备;在 Mac 可走 MPS
)
prompt = "Write a Python function to check if a number is prime."
inputs = tok(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tok.decode(outputs[0], skip_special_tokens=True))
PYTORCH_ENABLE_MPS_FALLBACK=1,必要时设置 PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0torch.float16 或启用 device_map="auto"swarm-YYYY-MM-DD(每日/每轮次版本号;后续推送时更新)与上游基础模型许可一致;请参见 Qwen2.5 的官方许可说明与链接。