Downloads · 30 days
6
12% of all-time downloads
ynanxiu/olmo190m-coffee-lora
olmo190m-coffee-lora is a text generation model from ynanxiu. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
使用 Unsloth 对 OLMo3-190M-zh-full 进行 QLoRA 微调的 LoRA adapter,数据集为 coffee-sft-dataset。
Downloads · 30 days
6
12% of all-time downloads
All-time downloads
51
Public
Repo size
13.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors13.6 MB · 78%
From the Hugging Face model README
使用 Unsloth 对 OLMo3-190M-zh-full 进行 QLoRA 微调的 LoRA adapter,数据集为 coffee-sft-dataset。
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
"ynanxiu/olmo3-190M-zh-full",
load_in_4bit=True,
max_seq_length=1024,
)
from peft import PeftModel
model = PeftModel.from_pretrained(model, "ynanxiu/olmo190m-coffee-lora")
FastLanguageModel.for_inference(model)
messages = [{"role": "user", "content": "介绍一下咖啡的种类"}]
inputs = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
input_ids = tokenizer(inputs, return_tensors="pt").to(model.device)
outputs = model.generate(**input_ids, max_new_tokens=200, temperature=0.3)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Q: 请用专业口吻介绍咖啡的种类和特点。
咖啡主要分为阿拉比卡(Arabica)和罗布斯塔(Robusta)两大类:
- 阿拉比卡:占全球产量60-70%,生长于高海拔地区,风味复杂,酸度明显
- 罗布斯塔:抗病性强,低海拔种植,苦味重,咖啡因含量高
Q: 咖啡因对人体有什么影响?
咖啡因对人体有显著影响,具有镇痛作用,能够缓解疲劳,并降低患心脏病的风险。