CoolFace
Modelpublic

yeshh008/qwen2.5-0.5b-instruct-fine-tuned

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes36downloads
Model Card

library_name: transformers tags:

  • —trl
  • —sft
  • —qwen2
  • —bitsandbytes
  • —4-bit
  • —lora base_model: Qwen/Qwen2.5-0.5B ---

Qwen2.5-0.5B Instruct Fine-Tuned (Alpaca-Reasoning)

This model is a fine-tuned version of Qwen/Qwen2.5-0.5B optimized for instruction following and basic logical reasoning. It was trained using LoRA and 4-bit quantization on a Tesla T4 GPU via Google Colab.

Model Details

  • —Developed by: yeshh008
  • —Model type: Causal Language Model
  • —Language(s): English
  • —License: Apache 2.0
  • —Finetuned from model: Qwen/Qwen2.5-0.5B

Results & Performance

MetricValue
Base ModelQwen2.5-0.5B
Precision4-bit (NF4)
Training Steps60 (Combined)
HardwareTesla T4 GPU
Logic Task (Sally)Solved (Step-by-step reasoning)

Training Hyperparameters

  • —Learning Rate: 2e-4
  • —Batch Size: 4 (with 4 Gradient Accumulation Steps)
  • —Optimizer: Paged AdamW 32-bit
  • —Scheduler: Linear
  • —LoRA R: 16
  • —LoRA Alpha: 32

How to Get Started

python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "yeshh008/qwen2.5-0.5b-instruct-fine-tuned"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.float16)

prompt = "### Instruction:\nWhat is the capital of Japan?\n\n### Response:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Limitations

As an ultra-small model (0.5B), it may struggle with highly complex mathematical proofs or very long-form creative writing. It is best suited for edge deployment and specific instruction tasks.

Citation

If you find this model useful, please cite the base model and the training libraries:

BibTeX

bibtex
@misc{qwen2.5-0.5b-instruct-ft,
  author = {yeshh008},
  title = {Qwen2.5-0.5B Instruct Fine-Tuned (Alpaca-Reasoning)},
  year = {2024},
  publisher = {Hugging Face},
  journal = {Hugging Face Hub},
  howpublished = {\url{https://huggingface.co/yeshh008/qwen2.5-0.5b-instruct-fine-tuned}}
}

@article{qwen25,
  title={Qwen2.5 Technical Report},
  author={Qwen Team},
  journal={arXiv preprint arXiv:2412.15115},
  year={2024}
}

APA

yeshh008. (2024). Qwen2.5-0.5B Instruct Fine-Tuned (Alpaca-Reasoning). Hugging Face. https://huggingface.co/yeshh008/qwen2.5-0.5b-instruct-fine-tuned

Training Analytics

To ensure transparency and track training stability, we provide the following metrics:

Training Loss

[image]

Learning Rate & Stability

Learning Rate ScheduleGradient Norm
[image][image]

Technical Specifications & Architecture

Model Backbone

  • —Architecture: Qwen2.5 (Causal Language Model)
  • —Parameters: 0.5 Billion
  • —Attention Mechanism: Multi-Head Attention with Rotary Positional Embeddings (RoPE).

Optimization & Quantization

  • —Quantization: 4-bit NormalFloat (NF4) via bitsandbytes.
  • —Compute Precision: Float16 (Optimized for Tesla T4 compatibility).
  • —PEFT Method: LoRA (Low-Rank Adaptation).
  • —Rank (r): 16
  • —Alpha: 32
  • —Target Modules: qproj, vproj

Intended Use Cases

  • —Instruction Following: Responding to structured Alpaca-style prompts.
  • —Edge Deployment: Designed for environments with limited VRAM (< 4GB).
  • —Logical Reasoning: Basic step-by-step problem solving (Note: may hallucinate on complex math).

Training Hardware

  • —Environment: Google Colab
  • —GPU: NVIDIA Tesla T4
  • —VRAM Usage: ~2.8 GB during training