Qwen3-1.7B-alpaca-cleaned - LoRA Adapters

Fine-tuned LoRA adapters for unsloth/Qwen3-1.7B-unsloth-bnb-4bit using supervised fine-tuning.

Model Details

Training Configuration

LoRA Parameters

  • LoRA Rank (r): 16
  • LoRA Alpha: 32
  • LoRA Dropout: 0.0
  • Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj

Training Hyperparameters

  • Learning Rate: 0.0002
  • Batch Size: 4
  • Gradient Accumulation Steps: 8
  • Effective Batch Size: 32
  • Epochs: 1
  • Max Sequence Length: 4096
  • Optimizer: adamw_8bit
  • Packing: True
  • Weight Decay: 0.01
  • Learning Rate Scheduler: linear

Training Results

  • Training Loss: 1.3403
  • Training Time: 53.0 minutes
  • Training Steps: Unknown
  • Dataset Samples: See dataset
  • Training Mode: Full training

Usage

Load with Transformers + PEFT

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
    "unsloth/Qwen3-1.7B-unsloth-bnb-4bit",
    load_in_4bit=True,
    device_map="auto"
)

# Load LoRA adapters
model = PeftModel.from_pretrained(base_model, "path/to/lora")
tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-1.7B-unsloth-bnb-4bit")

# Generate
messages = [{"role": "user", "content": "Your question here"}]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
outputs = model.generate(input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Load with Unsloth (Recommended)

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="path/to/lora",
    max_seq_length=4096,
    dtype=None,
    load_in_4bit=True,
)

# For inference
FastLanguageModel.for_inference(model)

# Generate
messages = [{"role": "user", "content": "Your question here"}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt").to("cuda")
outputs = model.generate(input_ids=inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Related Models

Dataset

Training dataset: yahma/alpaca-cleaned

Please refer to the dataset documentation for licensing and usage restrictions.

Merge with Base Model

To create a standalone merged model:

from unsloth import FastLanguageModel

# Load model with LoRA
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="path/to/lora",
    max_seq_length=4096,
    dtype=None,
    load_in_4bit=True,
)

# Save merged 16-bit model
model.save_pretrained_merged("merged_model", tokenizer, save_method="merged_16bit")

# Or save as GGUF for llama.cpp/Ollama
model.save_pretrained_gguf("model.gguf", tokenizer, quantization_method="q4_k_m")

Framework Versions

  • Unsloth: 2025.11.3
  • Transformers: 4.57.1
  • PyTorch: 2.9.0+cu128
  • PEFT: 0.18.0
  • TRL: 0.22.2
  • Datasets: 4.3.0

License

This model is based on unsloth/Qwen3-1.7B-unsloth-bnb-4bit and trained on yahma/alpaca-cleaned. Please refer to the original model and dataset licenses for usage terms.

Credits

Trained by: Farhan Syah

Training pipeline:

Base components:

Citation

If you use this model, please cite:

@misc{qwen3_1.7b_alpaca_cleaned_lora,
  author = {Farhan Syah},
  title = {Qwen3-1.7B-alpaca-cleaned Fine-tuned with LoRA},
  year = {2025},
  note = {Fine-tuned using Unsloth: https://github.com/unslothai/unsloth},
  howpublished = {\url{https://github.com/farhan-syah/unsloth-finetuning}}
}
Downloads last month
28
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for fs90/Qwen3-1.7B-alpaca-cleaned-lora

Finetuned
Qwen/Qwen3-1.7B
Adapter
(10)
this model