Text Generation
Transformers
Safetensors
qwen3_5
image-text-to-text
fine-tuned
lora
vistaar
unknown
qwen3
conversational
Instructions to use kenpath/mahavistaar-llm-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kenpath/mahavistaar-llm-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kenpath/mahavistaar-llm-v1") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("kenpath/mahavistaar-llm-v1") model = AutoModelForMultimodalLM.from_pretrained("kenpath/mahavistaar-llm-v1") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kenpath/mahavistaar-llm-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kenpath/mahavistaar-llm-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kenpath/mahavistaar-llm-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kenpath/mahavistaar-llm-v1
- SGLang
How to use kenpath/mahavistaar-llm-v1 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 "kenpath/mahavistaar-llm-v1" \ --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": "kenpath/mahavistaar-llm-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "kenpath/mahavistaar-llm-v1" \ --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": "kenpath/mahavistaar-llm-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kenpath/mahavistaar-llm-v1 with Docker Model Runner:
docker model run hf.co/kenpath/mahavistaar-llm-v1
mhv_synthetic_qwen3.5_v0.3
Fine-tuned version of kenpath/mhv_mhv-_all_qwen3.5-27b_v0.3 for the Vistaar (unknown) use case.
Model Details
- Base Model: kenpath/mhv_mhv-_all_qwen3.5-27b_v0.3
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- Training Framework: HuggingFace Transformers + PEFT + DeepSpeed ZeRO-3
- Merged: Full model weights (LoRA merged into base)
Training Configuration
LoRA Parameters
| Parameter | Value |
|---|---|
| Rank (r) | 64 |
| Alpha | 64 |
| Dropout | 0.1 |
| Target Modules | ['q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'] |
| Trainable Parameters | 318,767,104 / 27,214,765,568 (1.1713%) |
Training Hyperparameters
| Parameter | Value |
|---|---|
| Epochs | 1 |
| Per-device Batch Size | 1 |
| Gradient Accumulation | 1 |
| Effective Batch Size | 1 |
| Learning Rate | 5e-06 |
| LR Scheduler | cosine |
| Warmup Ratio | N/A |
| Weight Decay | 0.001 |
| Max Grad Norm | 1.0 |
Hardware & Performance
| Metric | Value |
|---|---|
| GPUs | 8x H100 80GB |
| Training Duration | 5.89 hours |
| Final Training Loss | 0.4769 |
| Dataset Size | 2,226 samples |
| Max Sequence Length | 100000 |
Dataset
- Name: combined-mh-synthetic-vistaar
- Samples Used: N/A
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"kenpath/mhv_synthetic_qwen3.5_v0.3",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("kenpath/mhv_synthetic_qwen3.5_v0.3")
messages = [
{"role": "user", "content": "Your question here"}
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
output = model.generate(input_ids, max_new_tokens=512)
print(tokenizer.decode(output[0], skip_special_tokens=True))
License
This model inherits the license from the base model kenpath/mhv_mhv-_all_qwen3.5-27b_v0.3.
Generated on 2026-03-16 05:21:25 | Merge took 4.8s
- Downloads last month
- 322