Instructions to use Whitewinter/model-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Whitewinter/model-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B") model = PeftModel.from_pretrained(base_model, "Whitewinter/model-lora") - Notebooks
- Google Colab
- Kaggle
metadata
license: apache-2.0
base_model: Qwen/Qwen3-0.6B
tags:
- peft
- lora
- fine-tuned
- qwen
datasets:
- tatsu-lab/alpaca
language:
- ko
- en
LoRA Fine-tuned Model
이 모델은 Qwen/Qwen3-0.6B을 기반으로 LoRA(Low-Rank Adaptation) 기법을 사용해 파인튜닝된 어댑터입니다.
모델 정보
- 베이스 모델: Qwen/Qwen3-0.6B
- 파인튜닝 방법: LoRA (Low-Rank Adaptation)
- 데이터셋: tatsu-lab/alpaca
사용 방법
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# 베이스 모델과 토크나이저 로드
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3-0.6B",
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# LoRA 어댑터 로드
model = PeftModel.from_pretrained(model, "Whitewinter/model-lora")
# 추론
prompt = "### Instruction:\nExplain what machine learning is.\n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)