Instructions to use nassimjp/Roshan3-VL-4B-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nassimjp/Roshan3-VL-4B-Thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="nassimjp/Roshan3-VL-4B-Thinking") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("nassimjp/Roshan3-VL-4B-Thinking") model = AutoModelForMultimodalLM.from_pretrained("nassimjp/Roshan3-VL-4B-Thinking", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nassimjp/Roshan3-VL-4B-Thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nassimjp/Roshan3-VL-4B-Thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nassimjp/Roshan3-VL-4B-Thinking", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/nassimjp/Roshan3-VL-4B-Thinking
- SGLang
How to use nassimjp/Roshan3-VL-4B-Thinking with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nassimjp/Roshan3-VL-4B-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nassimjp/Roshan3-VL-4B-Thinking", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nassimjp/Roshan3-VL-4B-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nassimjp/Roshan3-VL-4B-Thinking", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use nassimjp/Roshan3-VL-4B-Thinking with Docker Model Runner:
docker model run hf.co/nassimjp/Roshan3-VL-4B-Thinking
Roshan3-VL-4B-Thinking 🌟
A Pashto-focused fine-tuned language model based on Qwen3-VL-4B-Thinking.
Roshan3-VL-4B-Thinking (روښان) is an independently developed fine-tuned model focused on understanding and generating natural Pashto text.
The project aims to contribute to the development of Pashto-language artificial intelligence by improving Pashto comprehension, conversational ability, reasoning, and language generation.
The model is developed and maintained by nassimjp.
Model Information
| Property | Details |
|---|---|
| Model Name | Roshan3-VL-4B-Thinking |
| Pashto Name | روښان |
| Developer | nassimjp |
| Base Model | Qwen3-VL-4B-Thinking |
| Fine-tuning Base | nassimjp/Qwen3-VL-4B-Thinking-Pashto-Zi |
| Model Size | 4B parameters |
| Fine-tuning Method | QLoRA |
| Export Method | Merged Model |
| Model Precision | FP16 (16-bit) |
| Framework | Unsloth, Hugging Face Transformers, TRL |
| Primary Language | Pashto |
| Additional Language | English |
| License | Apache-2.0 |
Project Goals
Roshan is designed to advance Pashto-language AI capabilities.
The primary objectives include:
- Understanding written Pashto.
- Generating natural and meaningful Pashto responses.
- Improving Pashto conversational interactions.
- Understanding Pashto questions and instructions.
- Supporting Pashto reasoning and analytical tasks.
- Improving Pashto vocabulary, grammar, and sentence construction.
- Supporting multilingual communication.
Current development focus: Pashto text understanding and generation.
Although the underlying architecture is a vision-language model, the current fine-tuning project has focused on text data. Image-understanding performance has not yet been independently evaluated.
Training Information
Roshan3-VL-4B-Thinking was fine-tuned using QLoRA, with Unsloth and Hugging Face training tools.
Training Configuration
| Parameter | Value |
|---|---|
| Training Method | QLoRA |
| Training Framework | Unsloth |
| Training Library | Hugging Face TRL |
| Export Format | Merged Model |
| Precision | FP16 (16-bit) |
| Training Status | Stopped at partial training |
| Completed Epoch | 0.42 |
| Training Steps | 27,316 / 65,207 |
| Training Progress | 42% |
| Training Loss | 0.4718 |
| Learning Rate | 1.74e-5 |
| Gradient Norm | 0.716 |
| Training Duration | 3h 35m 6s |
| Processing Speed | 2.12 steps/second |
| Tokens Processed | 77,635,598 |
| Training Pairs Processed | 10,000 |
Note: The training run stopped at 42% of its planned steps. The exported model represents the available checkpoint, not a fully completed training run.
Model Export
The trained checkpoint was successfully exported and uploaded to Hugging Face Hub.
| Export Property | Details |
|---|---|
| Export Status | Complete |
| Export Method | Merged Model |
| Format | 16-bit FP16 |
| Export Duration | 2 minutes 19 seconds |
| Hub Upload | Successful |
Original Fine-tuning Checkpoint
nassimjp/Qwen3-VL-4B-Thinking-Pashto-Zi_1793282777
Base Model
nassimjp/Qwen3-VL-4B-Thinking-Pashto-Zi
Installation
Install the required libraries:
pip install -U transformers accelerate torch
For the latest Qwen3-VL architecture support, use a compatible Transformers release.
Usage
The following is a basic Transformers loading example for the Qwen3-VL architecture:
import torch
from transformers import (
Qwen3VLForConditionalGeneration,
AutoProcessor
)
model_id = "nassimjp/Roshan3-VL-4B-Thinking"
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "سلام روښانه! ته څوک یې؟"
}
]
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True
).to(model.device)
generated_ids = model.generate(
**inputs,
max_new_tokens=256
)
generated_ids_trimmed = [
output_ids[len(input_ids):]
for input_ids, output_ids in zip(
inputs.input_ids,
generated_ids
)
]
response = processor.batch_decode(
generated_ids_trimmed,
skip_special_tokens=True
)[0]
print(response)
Note: This example assumes the exported repository includes the required model configuration, tokenizer, and processor files.
Model Limitations
- Pashto capabilities require further independent evaluation.
- Training was stopped before reaching the planned 65,207 steps.
- The reported training loss is not an independent measure of model quality.
- The current fine-tuning dataset focused on text rather than image-language training.
- Responses may contain factual errors, grammatical mistakes, or reasoning limitations.
- Image understanding and multilingual performance should be evaluated separately.
Acknowledgements
Special thanks to the developers and communities behind:
This project builds upon the open-source Qwen3-VL architecture and its associated tooling.
About Roshan
روښان (Roshan) means light or illumination.
The purpose of this project is to help bring Pashto language, knowledge, and communication into the world of modern artificial intelligence.
Roshan is an independent fine-tuning project developed by nassimjp.
Built for Pashto. Developed with AI.
🌟 Roshan3-VL-4B-Thinking
- Downloads last month
- 7
Model tree for nassimjp/Roshan3-VL-4B-Thinking
Base model
Qwen/Qwen3-VL-4B-Thinking