MiniCPM-V-4.7-1B-Pashto-Base
This is the Stage 2 base checkpoint of the nassimjp/MiniCPM-V-4.7-1B-Pashto model, fine-tuned from openbmb/MiniCPM-V-4.7-1B.
In this stage, the 18 newly added Pashto-specific atomic tokens and their embedding/lm_head weights (which were initialized randomly in Stage 1) have been aligned and harmonized with the surrounding Arabic-script embedding space, preparing the model for downstream multimodal and text fine-tuning.
- Developed by: nassimjp
- License: apache-2.0
- Finetuned from model:
nassimjp/MiniCPM-V-4.7-1B-Pashto - Base Model:
openbmb/MiniCPM-V-4.7-1B - Architecture: MiniCPMV4_7ForConditionalGeneration
Training & Alignment Details
- Stage: Stage 2 Alignment (Embedding & Initial Adaptation)
- Framework: Unsloth / Hugging Face TRL
- Precision: 16-bit (FP16 / BF16)
This minicpmv4_7 model was trained 2x faster with Unsloth and Huggingface's TRL library.
About MiniCPM-V 4.7 (Base Architecture Overview)
MiniCPM-V 4.7 is the latest model in the MiniCPM-V series, available in a 1B variant. It builds on the family's single-image, multi-image, and video understanding capabilities, combining stronger foundation capabilities with efficient visual encoding and on-device inference. Notable features of MiniCPM-V 4.7 include:
- 🔥 A New Pareto Frontier in Performance and Efficiency. As model capabilities continue to advance, inference efficiency has become an important measure of a model's value. The 1B variant of MiniCPM-V 4.7 advances the performance–efficiency Pareto frontier for MLLMs.
- 🚀 Efficient Architecture. Based on the intra-ViT early compression technique from LLaVA-UHD v4, MiniCPM-V 4.7 compresses visual tokens early within the vision encoder.
- 💻 Broad Platform and Chip Support. MiniCPM-V 4.7 supports iOS, Android, and HarmonyOS, together with open-source on-device deployment support.
Usage Example (Pashto-Base)
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText
model_id = "nassimjp/MiniCPM-V-4.7-1B-Pashto-Base"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
model.eval()
messages = [
{
"role": "user",
"content": "ته د خپل وزن خبره کوه😜 چې څومره نغدی چغدی جوړوي",
},
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=128)
generated = output[0][inputs["input_ids"].shape[1]:]
print(processor.tokenizer.decode(generated, skip_special_tokens=True))
Intended Use
- Foundation Checkpoint: Ready for full-scale Supervised Fine-Tuning (SFT) or LoRA on Pashto text and multimodal datasets.
- Multimodal Pashto Tasks: Capable of handling image-text-to-text tasks with native Pashto script alignment.