CoolFace
Modelpublic

Hariharan05/Qwen3-1.7B-Distill-Claude

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes82downloads
Model Card

Qwen3-1.7B-Distill-Claude

This is a fine-tuned version of the Qwen/Qwen3-1.7B model, trained to follow instructions and generate high-quality responses using a distilled Claude-Alpaca dataset.

This model was trained using EasyFineTuner and Unsloth for 2x faster training and optimized memory usage. It is provided in lightweight GGUF formats (q4_k_m and q5_k_m) for seamless local inference.

๐Ÿ“Š Model Details

  • โ€”Base Model: Qwen/Qwen3-1.7B
  • โ€”Architecture: Causal LM
  • โ€”Parameters: 1.7 Billion
  • โ€”Trainable Parameters: 17,432,576 (LoRA)
  • โ€”Format: GGUF & LoRA Adapters

๐Ÿ“š Dataset Information

The model was trained on a high-quality blend of 30,000 instruction-following examples:

  • โ€”Norquinal/WizardLM_alpaca_claude_evol_instruct_70k (25,000 examples)
  • โ€”AlSamCur123/Alpaca (5,000 examples)

Dataset Statistics:

  • โ€”Total Training Examples: 28,500
  • โ€”Total Validation Examples: 1,500
  • โ€”Average Sequence Length: 139 tokens
  • โ€”Max Sequence Length Used: 1024 tokens

โš™๏ธ Training Configuration

The model was fine-tuned using Low-Rank Adaptation (LoRA) with the following hyperparameters:

  • โ€”Epochs: 1
  • โ€”Learning Rate: 2.0e-04
  • โ€”Batch Size: 4
  • โ€”Gradient Accumulation Steps: 4 (Total Effective Batch Size: 32)
  • โ€”LoRA Rank (r): 16
  • โ€”LoRA Alpha: 64
  • โ€”Warmup Steps: 100
  • โ€”Weight Decay: 0.01
  • โ€”Optimizer: AdamW

Performance:

  • โ€”Final Training Loss: 1.1782
  • โ€”Training Time: ~3.3 hours on a single Tesla T4 GPU

๐Ÿ’ป Usage (Local Inference)

You can run this model locally using Ollama or llama.cpp.

Using Ollama

Create a Modelfile with the following content:

dockerfile
FROM ./Qwen3-1.5B-Distill-Claudeq4_k_m.gguf
TEMPLATE \"\"\"<|im_start|>system
You are a helpful AI assistant trained to assist with coding questions, explain technical concepts, and engage in friendly conversation. Be concise but thorough in your explanations.<|im_start|>user
{{ .Prompt }}<|im_start|>assistant
\"\"\"
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|endoftext|>"

Quick start

python
from transformers import pipeline

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?"
generator = pipeline("text-generation", model="None", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

Training procedure

This model was trained with SFT.

Framework versions

  • โ€”PEFT 0.18.1
  • โ€”TRL: 0.23.0
  • โ€”Transformers: 4.56.2
  • โ€”Pytorch: 2.10.0+cu128
  • โ€”Datasets: 4.3.0
  • โ€”Tokenizers: 0.22.2