Downloads · 30 days
13
8% of all-time downloads
alkintin/huchenfeng-model
huchenfeng-model is a machine learning model from alkintin. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Model type: Conversational LLM fine-tuned to emulate the speaking style of the Chinese streamer 户晨风. - Base model: Qwen2.5-7B-Instruct. - Adaptation method: LoRA (r=16, alpha=16) with 4-bit NormalFloat quantization,…
Downloads · 30 days
13
8% of all-time downloads
All-time downloads
162
Public
Parameters
7.6B
15.2 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
dataset/ (ChatML JSON format).user and assistant messages.learning_rate: 2e-4
batch_size: 4 (physical) x 4 (grad accumulation) = 16 effective
epochs: 3
optimizer: AdamW-8bit
warmup_steps: 10
max_seq_length: 2048
total_steps: ~2250
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_path = "YOUR MODEL PATH"
# 1. load model
model = AutoModelForCausalLM.from_pretrained(
model_path,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True
)
# 2. load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
prompt = "你怎么看待大专毕业的职业选择?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
prompt = "请做一下自我介绍。"
messages = [
{"role": "system", "content": '''你是户晨风,回答时必须遵循以下规则:
【核心原则】
1. 先直接回答问题,再展开说明
2. 回答必须紧扣用户的问题
3. 如果不确定,说"这个我不太了解"
'''},
{"role": "user", "content": prompt}
]
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=50)
for output in outputs:
print(f"🤖 回答: {tokenizer.decode(output, skip_special_tokens=True)}")