Image-Text-to-Text
Transformers
Safetensors
inkling_mm_model
Mixture of Experts
testing
minimized
not-for-production
conversational
Instructions to use tbmod/Inkling-mini-nvfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tbmod/Inkling-mini-nvfp4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tbmod/Inkling-mini-nvfp4") 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("tbmod/Inkling-mini-nvfp4") model = AutoModelForMultimodalLM.from_pretrained("tbmod/Inkling-mini-nvfp4", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tbmod/Inkling-mini-nvfp4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tbmod/Inkling-mini-nvfp4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tbmod/Inkling-mini-nvfp4", "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/tbmod/Inkling-mini-nvfp4
- SGLang
How to use tbmod/Inkling-mini-nvfp4 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 "tbmod/Inkling-mini-nvfp4" \ --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": "tbmod/Inkling-mini-nvfp4", "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 "tbmod/Inkling-mini-nvfp4" \ --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": "tbmod/Inkling-mini-nvfp4", "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" } } ] } ] }' - Docker Model Runner
How to use tbmod/Inkling-mini-nvfp4 with Docker Model Runner:
docker model run hf.co/tbmod/Inkling-mini-nvfp4
File size: 2,244 Bytes
69a4fd2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | {
"architectures": [
"InklingForConditionalGeneration"
],
"model_type": "inkling_mm_model",
"eos_token_id": 200006,
"text_config": {
"model_max_length": 1048576,
"torch_dtype": "bfloat16",
"hidden_size": 6144,
"num_hidden_layers": 12,
"vocab_size": 201024,
"num_attention_heads": 64,
"num_key_value_heads": 8,
"head_dim": 128,
"d_rel": 16,
"rel_extent": 1024,
"q_bias": false,
"o_bias": false,
"log_scaling_n_floor": 128000,
"log_scaling_alpha": 0.1,
"rms_norm_eps": 1e-06,
"use_embed_norm": true,
"local_layer_ids": [
0,
1,
2,
3,
4,
6,
7,
8,
9,
10
],
"dense_mlp_idx": 2,
"use_sconv": true,
"sconv_kernel_size": 4,
"unpadded_vocab_size": 200058,
"logits_mup_width_multiplier": 24.0,
"final_logit_softcapping": null,
"swa_head_dim": 128,
"swa_num_attention_heads": 64,
"swa_num_key_value_heads": 16,
"sliding_window_size": 512,
"n_routed_experts": 16,
"num_experts_per_tok": 6,
"n_shared_experts": 2,
"shared_expert_sink": true,
"dense_intermediate_size": 24576,
"intermediate_size": 3072,
"route_scale": 8.0,
"use_gate_bias": true,
"gate_activation": "sigmoid",
"norm_after_topk": true,
"use_global_scale": true
},
"audio_config": {
"decoder_dmodel": 6144,
"n_mel_bins": 80,
"mel_vocab_size": 16,
"bias": false,
"dmel_min_value": -7.0,
"dmel_max_value": 2.0,
"use_audio_norm": true,
"audio_mode": "dmel"
},
"vision_config": {
"vision_encoder_type": "hmlp",
"decoder_dmodel": 6144,
"patch_size": 40,
"temporal_patch_size": 2,
"n_channels": 3,
"n_layers": 4,
"use_vision_norm": true
},
"mtp_config": {
"num_nextn_predict_layers": 2,
"chain_hidden_post_norm": false,
"local_layer_ids": [
0
]
}
} |