MiniCPM5-2B-SFT-Pashto-Instruct 🚀🧬🇦🇫

MiniCPM5-2B-SFT-Pashto-Instruct is a specialized Pashto instruction-tuned model developed as part of the iPashto.ai initiative. The model is fine-tuned from the openbmb/MiniCPM-2B-sft-bf16 backbone using LoRA/QLoRA adapter techniques and fully merged into 16-bit (bfloat16) safetensors format for native deployment and further downstream tuning.


Model Details

  • Developed by: Nassimjp / iPashto.ai
  • Base Model: openbmb/MiniCPM-2B-sft-bf16
  • Language: Pashto (ps)
  • License: Apache-2.0
  • Architecture: Causal LM (MiniCPM Architecture)
  • Precision: 16-bit (bfloat16 Merged)
  • Training Method: Supervised Fine-Tuning (SFT) via LoRA

Training Highlights & Loss Metrics

The fine-tuning run was executed locally using an NVIDIA RTX 4070 Ti SUPER (16GB VRAM) across 8,952 steps.

  • Training Loss: Reduced smoothly from 4.61 to ~0.54
  • Evaluation Loss: Consistent descent down to ~0.91 without overfitting
  • Gradient Norm: Maintained stable updates around 1.4 - 2.2

Quickstart & Usage

1. Using Transformers (Python)

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "nassimjp/MiniCPM5-2B-SFT-Pashto-Instruct"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)

prompt = "د پښتو ژبې او مصنوعي ځیرکتیا پرمختګ څه اهمیت لري؟"

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

2. Running via llama.cpp / GGUF

For edge deployment or GGUF quantization, load the merged weights into llama.cpp:

./llama-cli -m ./MiniCPM5-2B-SFT-Pashto-Instruct.F16.gguf \
  -p "پښتو ژبه د افغانستان..." \
  -n 256

Project Context

Developed under the iPashto.ai framework dedicated to advancing Pashto Natural Language Processing (NLP), specialized datasets, and open-weight AI accessibility for low-resource languages.


Downloads last month
-
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nassimjp/MiniCPM5-2B-SFT-Pashto-Instruct

Adapter
(1)
this model
Quantizations
1 model