Downloads · 30 days
213
49% of all-time downloads
Threatthriver/qwen3-0.6b-alpaca-lora
qwen3-0.6b-alpaca-lora is a text generation model from Threatthriver. 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.
Downloads · 30 days
213
49% of all-time downloads
All-time downloads
438
Public
Repo size
122 MB
Likes
1
Public
Click a slice to open those files.
.pt73.8 MB · 45%
From the Hugging Face model README
Author: Aniket Kumar (Threatthriver)
A LoRA fine-tune of Qwen/Qwen3-0.6B, trained with TRL's SFTTrainer on an instruction-following dataset.
| Base model | Qwen/Qwen3-0.6B |
| Adapter type | LoRA (PEFT) |
| Task | Text generation / instruction following |
| Language | English |
| License | Apache 2.0 |
This repository contains only the LoRA adapter weights, not the full merged model. You need the base model (Qwen/Qwen3-0.6B) loaded alongside this adapter to run inference.
This adapter is intended for general-purpose instruction-following and conversational text generation on lightweight/edge hardware where a 0.6B parameter model is appropriate. It is a small-scale fine-tune meant for experimentation, prototyping, and learning the LoRA/SFT fine-tuning pipeline — not a production-grade instruction model.
Out of scope: factual/medical/legal advice, safety-critical applications, or any use case requiring strong guarantees on accuracy, given the small base model size and limited training data.
q_proj, k_proj, v_proj, o_projfrom transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen3-0.6B"
adapter_id = "Threatthriver/qwen3-0.6b-alpaca-lora"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="cuda",
)
model = PeftModel.from_pretrained(base_model, adapter_id)
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
messages = [{"role": "user", "content": question}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output_ids = model.generate(**inputs, max_new_tokens=128)
response = tokenizer.decode(output_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response)
If you'd rather have a single standalone model instead of base + adapter:
merged_model = model.merge_and_unload()
merged_model.save_pretrained("./qwen3-0.6b-merged")
tokenizer.save_pretrained("./qwen3-0.6b-merged")
text-davinci-003); responses may inherit dated phrasing, occasional factual errors, or formulaic style from that source data.Built using Hugging Face's TRL and PEFT libraries, on top of Alibaba's Qwen3 base model.
For questions or issues with this adapter, reach out via Hugging Face.