Image-Text-to-Text
Transformers
Safetensors
inkling_mm_model
llm-compressor
tiny-model
mtp
pr-3225
test-fixture
conversational
Instructions to use inference-optimization/Inkling-0.92B-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inference-optimization/Inkling-0.92B-MTP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="inference-optimization/Inkling-0.92B-MTP") 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("inference-optimization/Inkling-0.92B-MTP") model = AutoModelForMultimodalLM.from_pretrained("inference-optimization/Inkling-0.92B-MTP", 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 inference-optimization/Inkling-0.92B-MTP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inference-optimization/Inkling-0.92B-MTP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inference-optimization/Inkling-0.92B-MTP", "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/inference-optimization/Inkling-0.92B-MTP
- SGLang
How to use inference-optimization/Inkling-0.92B-MTP 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 "inference-optimization/Inkling-0.92B-MTP" \ --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": "inference-optimization/Inkling-0.92B-MTP", "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 "inference-optimization/Inkling-0.92B-MTP" \ --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": "inference-optimization/Inkling-0.92B-MTP", "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 inference-optimization/Inkling-0.92B-MTP with Docker Model Runner:
docker model run hf.co/inference-optimization/Inkling-0.92B-MTP
Download validation.json from inference-optimization/Inkling-0.92B-MTP: direct link, hf CLI and curl.
- Browser
- Download file 15 kB
-
https://huggingface.co/inference-optimization/Inkling-0.92B-MTP/resolve/main/validation.json
- Command line
-
hf download hf://inference-optimization/Inkling-0.92B-MTP/validation.json
-
curl -L -o validation.json https://huggingface.co/inference-optimization/Inkling-0.92B-MTP/resolve/main/validation.json
15 kB
| { | |
| "llm_compressor_commit": "2d5242056a8a00028686a303771ffc8e2fe27d07", | |
| "compressed_tensors_commit": "e69c8dc58aa152e5f5e36e85800ec1d2e7de5271", | |
| "transformers": "5.17.0", | |
| "torch": "2.14.0+cu130", | |
| "vllm": "0.30.0", | |
| "base_architecture": "thinkingmachines/Inkling", | |
| "base_revision": "828496eeae4c243ff1a22f7f28ff83694f2f7bc9", | |
| "fixture": "inkling", | |
| "variant": "source", | |
| "parameter_counts": { | |
| "architecture": "InklingForConditionalGeneration", | |
| "layers_only_parameters": 62689820678, | |
| "backbone_parameters": 830199043, | |
| "mtp_parameters": 85799426, | |
| "total_parameters": 915998469, | |
| "changes": { | |
| "dtype": { | |
| "original": null, | |
| "tiny": "bfloat16" | |
| }, | |
| "text_config": { | |
| "original": { | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": "bfloat16", | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "vocab_size": 201024, | |
| "unpadded_vocab_size": 200058, | |
| "hidden_size": 6144, | |
| "num_hidden_layers": 66, | |
| "num_attention_heads": 64, | |
| "num_key_value_heads": 8, | |
| "head_dim": 128, | |
| "swa_num_attention_heads": 64, | |
| "swa_num_key_value_heads": 16, | |
| "swa_head_dim": 128, | |
| "sliding_window_size": 512, | |
| "d_rel": 16, | |
| "rel_extent": 1024, | |
| "log_scaling_n_floor": 128000, | |
| "log_scaling_alpha": 0.1, | |
| "local_layer_ids": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 24, | |
| 25, | |
| 26, | |
| 27, | |
| 28, | |
| 30, | |
| 31, | |
| 32, | |
| 33, | |
| 34, | |
| 36, | |
| 37, | |
| 38, | |
| 39, | |
| 40, | |
| 42, | |
| 43, | |
| 44, | |
| 45, | |
| 46, | |
| 48, | |
| 49, | |
| 50, | |
| 51, | |
| 52, | |
| 54, | |
| 55, | |
| 56, | |
| 57, | |
| 58, | |
| 60, | |
| 61, | |
| 62, | |
| 63, | |
| 64 | |
| ], | |
| "layer_types": [ | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid" | |
| ], | |
| "max_position_embeddings": 1048576, | |
| "rms_norm_eps": 1e-06, | |
| "conv_kernel_size": 4, | |
| "mlp_layer_types": [ | |
| "dense", | |
| "dense", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse" | |
| ], | |
| "intermediate_size": 24576, | |
| "hidden_act": "silu", | |
| "moe_intermediate_size": 3072, | |
| "n_routed_experts": 256, | |
| "num_experts_per_tok": 6, | |
| "n_shared_experts": 2, | |
| "shared_expert_sink": true, | |
| "route_scale": 8.0, | |
| "logits_mup_width_multiplier": 24.0, | |
| "rms_norm_eps_moe_gate": 1e-06, | |
| "attention_dropout": 0.0, | |
| "initializer_range": 0.02, | |
| "pad_token_id": null, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "num_mtp_layers": 8, | |
| "chain_hidden_post_norm": false, | |
| "mtp_hidden_states_first": true, | |
| "mtp_local_layer_ids": [ | |
| 0, | |
| 2, | |
| 4, | |
| 5, | |
| 6, | |
| 7 | |
| ], | |
| "number_of_conv_states": 4, | |
| "_name_or_path": "", | |
| "q_bias": false, | |
| "o_bias": false, | |
| "use_embed_norm": true, | |
| "use_sconv": true, | |
| "final_logit_softcapping": null, | |
| "use_gate_bias": true, | |
| "gate_activation": "sigmoid", | |
| "norm_after_topk": true, | |
| "use_global_scale": true, | |
| "model_type": "inkling_text", | |
| "output_attentions": false | |
| }, | |
| "tiny": { | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": "bfloat16", | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "vocab_size": 201024, | |
| "unpadded_vocab_size": 200058, | |
| "hidden_size": 1536, | |
| "num_hidden_layers": 3, | |
| "num_attention_heads": 16, | |
| "num_key_value_heads": 8, | |
| "head_dim": 128, | |
| "swa_num_attention_heads": 16, | |
| "swa_num_key_value_heads": 8, | |
| "swa_head_dim": 128, | |
| "sliding_window_size": 512, | |
| "d_rel": 16, | |
| "rel_extent": 1024, | |
| "log_scaling_n_floor": 128000, | |
| "log_scaling_alpha": 0.1, | |
| "local_layer_ids": [ | |
| 0, | |
| 1 | |
| ], | |
| "layer_types": [ | |
| "hybrid_sliding", | |
| "hybrid_sliding", | |
| "hybrid" | |
| ], | |
| "max_position_embeddings": 1048576, | |
| "rms_norm_eps": 1e-06, | |
| "conv_kernel_size": 4, | |
| "mlp_layer_types": [ | |
| "dense", | |
| "dense", | |
| "sparse" | |
| ], | |
| "intermediate_size": 6144, | |
| "hidden_act": "silu", | |
| "moe_intermediate_size": 1024, | |
| "n_routed_experts": 16, | |
| "num_experts_per_tok": 6, | |
| "n_shared_experts": 2, | |
| "shared_expert_sink": true, | |
| "route_scale": 8.0, | |
| "logits_mup_width_multiplier": 6.0, | |
| "rms_norm_eps_moe_gate": 1e-06, | |
| "attention_dropout": 0.0, | |
| "initializer_range": 0.02, | |
| "pad_token_id": null, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "num_mtp_layers": 2, | |
| "chain_hidden_post_norm": false, | |
| "mtp_hidden_states_first": true, | |
| "mtp_local_layer_ids": [ | |
| 0 | |
| ], | |
| "number_of_conv_states": 4, | |
| "_name_or_path": "", | |
| "q_bias": false, | |
| "o_bias": false, | |
| "use_embed_norm": true, | |
| "use_sconv": true, | |
| "final_logit_softcapping": null, | |
| "use_gate_bias": true, | |
| "gate_activation": "sigmoid", | |
| "norm_after_topk": true, | |
| "use_global_scale": true, | |
| "model_type": "inkling_text", | |
| "output_attentions": false | |
| } | |
| }, | |
| "audio_config": { | |
| "original": { | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": null, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "n_mel_bins": 80, | |
| "mel_vocab_size": 16, | |
| "text_hidden_size": 6144, | |
| "rms_norm_eps": 1e-06, | |
| "initializer_range": 0.02, | |
| "_name_or_path": "", | |
| "decoder_dmodel": 6144, | |
| "bias": false, | |
| "dmel_min_value": -7.0, | |
| "dmel_max_value": 2.0, | |
| "use_audio_norm": true, | |
| "audio_mode": "dmel", | |
| "model_type": "inkling_audio", | |
| "output_attentions": false | |
| }, | |
| "tiny": { | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": null, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "n_mel_bins": 80, | |
| "mel_vocab_size": 16, | |
| "text_hidden_size": 1536, | |
| "rms_norm_eps": 1e-06, | |
| "initializer_range": 0.02, | |
| "_name_or_path": "", | |
| "decoder_dmodel": 6144, | |
| "bias": false, | |
| "dmel_min_value": -7.0, | |
| "dmel_max_value": 2.0, | |
| "use_audio_norm": true, | |
| "audio_mode": "dmel", | |
| "model_type": "inkling_audio", | |
| "output_attentions": false | |
| } | |
| }, | |
| "vision_config": { | |
| "original": { | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": null, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "text_hidden_size": 6144, | |
| "patch_size": 40, | |
| "temporal_patch_size": 2, | |
| "num_channels": 3, | |
| "hidden_size": 1024, | |
| "n_layers": 4, | |
| "num_attention_heads": 16, | |
| "rms_norm_eps": 1e-06, | |
| "initializer_range": 0.02, | |
| "_name_or_path": "", | |
| "vision_encoder_type": "hmlp", | |
| "decoder_dmodel": 6144, | |
| "n_channels": 3, | |
| "use_vision_norm": true, | |
| "model_type": "inkling_vision", | |
| "output_attentions": false | |
| }, | |
| "tiny": { | |
| "architectures": null, | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": null, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "text_hidden_size": 1536, | |
| "patch_size": 40, | |
| "temporal_patch_size": 2, | |
| "num_channels": 3, | |
| "hidden_size": 1024, | |
| "n_layers": 4, | |
| "num_attention_heads": 16, | |
| "rms_norm_eps": 1e-06, | |
| "initializer_range": 0.02, | |
| "_name_or_path": "", | |
| "vision_encoder_type": "hmlp", | |
| "decoder_dmodel": 6144, | |
| "n_channels": 3, | |
| "use_vision_norm": true, | |
| "model_type": "inkling_vision", | |
| "output_attentions": false | |
| } | |
| }, | |
| "mtp_config": { | |
| "original": { | |
| "num_nextn_predict_layers": 8, | |
| "chain_hidden_post_norm": false, | |
| "local_layer_ids": [ | |
| 0, | |
| 2, | |
| 4, | |
| 5, | |
| 6, | |
| 7 | |
| ] | |
| }, | |
| "tiny": { | |
| "num_nextn_predict_layers": 2, | |
| "chain_hidden_post_norm": false, | |
| "local_layer_ids": [ | |
| 0 | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "backbone_validation": { | |
| "name": "inkling", | |
| "passed": true, | |
| "reloaded_perplexity": 1.570810437713275, | |
| "model_patches": false, | |
| "backbone_parameters": 830199043, | |
| "backbone_activated_parameters_estimate": 783013123, | |
| "generation": "The capital of France is Paris. Paris is the largest city in France and serves as the country's political," | |
| }, | |
| "mtp_training": "synthetic initialized projections with trained final decoder block copied; not separately trained", | |
| "training": { | |
| "seed": 3225, | |
| "initialization": "random", | |
| "optimizer": "AdamW", | |
| "learning_rate": 0.0004, | |
| "weight_decay": 0.01, | |
| "batch_size": 2, | |
| "max_sequence_length": 160, | |
| "evaluation": "same toy corpus as training" | |
| } | |
| } | |