Downloads · 30 days
0
venoda/qwen3-0.6b-lora
qwen3-0.6b-lora is a machine learning model from venoda. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
「Mostly Basic Python Problems Dataset」を使用してLoRAを作成してみました。
Downloads · 30 days
0
Access
Public
Updated Sep 11, 2025
Repo size
1.9 GB
Likes
0
Public
Click a slice to open those files.
.pt1.3 GB · 50%
From the Hugging Face model README
「Mostly Basic Python Problems Dataset」を使用してLoRAを作成してみました。
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import LoraConfig, TaskType, get_peft_model, PeftModel
device = torch.accelerator.current_accelerator().type if hasattr(torch, "accelerator") else "cuda"
model_id = "Qwen/Qwen3-0.6B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=device)
model = PeftModel.from_pretrained(model, "qwen3-0.6b-lora")
inputs = tokenizer("Preheat the oven to 350 degrees and place the cookie dough", return_tensors="pt")
outputs = model.generate(**inputs.to(device), max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))