Image-Text-to-Text
Transformers
Safetensors
inkling2_loop_patched
conversational
Mixture of Experts
inkling2_loop
gated-delta-rule
linear-attention
experimental
not-trained
custom_code
Instructions to use RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched", trust_remote_code=True) 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 AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched", "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/RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched
- SGLang
How to use RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched 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 "RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched" \ --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": "RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched", "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 "RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched" \ --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": "RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched", "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 RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched with Docker Model Runner:
docker model run hf.co/RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched
Download patch_manifest.json from RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched: direct link, hf CLI and curl.
- Browser
- Download file 14.6 kB
-
https://huggingface.co/RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched/resolve/main/patch_manifest.json
- Command line
-
hf download hf://RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched/patch_manifest.json
-
curl -L -o patch_manifest.json https://huggingface.co/RESMP-DEV/Inkling-2-Mini-LinearAttention-GatedDelta-Patched/resolve/main/patch_manifest.json
14.6 kB
| { | |
| "base": { | |
| "config_model_type": "inkling2_loop", | |
| "path": "/Users/kearm/.cache/alphaheng/hf/inkling2-mini", | |
| "safetensors": [ | |
| { | |
| "bytes": 19526019168, | |
| "file": "model-00001-of-00001.safetensors", | |
| "sha256": "65e60f51aa1284d4fb022584908c315270334d991828bb774af60584523539d1" | |
| }, | |
| { | |
| "bytes": 635801416, | |
| "file": "mtp.safetensors", | |
| "sha256": "7c3b651317f01f73bcf4e1dceba66ef8b7e1a1eac6bc171e882e690a4b10a1d2" | |
| } | |
| ] | |
| }, | |
| "created_at": "2026-11-25T02:56:02.976410+00:00", | |
| "elapsed_seconds": 263.751, | |
| "in_memory_class": "Inkling2LoopForConditionalGeneration", | |
| "init_seed": 20261124, | |
| "layers": [ | |
| { | |
| "layer_idx": 5, | |
| "new_parameter_count": 113736, | |
| "new_tensors": { | |
| "beta_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "beta_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": -4.4555683416547254e-05, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012005355209112167 | |
| }, | |
| "decay_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": -0.10546875, | |
| "mean": -0.10546875, | |
| "min": -0.10546875, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "decay_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": 1.5555617210338823e-05, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012042342685163021 | |
| }, | |
| "out_norm": { | |
| "dtype": "torch.bfloat16", | |
| "max": 1.0, | |
| "mean": 1.0, | |
| "min": 1.0, | |
| "numel": 3072, | |
| "shape": [ | |
| 24, | |
| 128 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "out_scale": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| } | |
| }, | |
| "operator": "gated_delta", | |
| "svd_relative_errors": null | |
| }, | |
| { | |
| "layer_idx": 11, | |
| "new_parameter_count": 113736, | |
| "new_tensors": { | |
| "beta_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "beta_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": 2.1529547666432336e-05, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012064059264957905 | |
| }, | |
| "decay_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": -0.10546875, | |
| "mean": -0.10546875, | |
| "min": -0.10546875, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "decay_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": -5.853087350260466e-05, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012014651671051979 | |
| }, | |
| "out_norm": { | |
| "dtype": "torch.bfloat16", | |
| "max": 1.0, | |
| "mean": 1.0, | |
| "min": 1.0, | |
| "numel": 3072, | |
| "shape": [ | |
| 24, | |
| 128 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "out_scale": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| } | |
| }, | |
| "operator": "gated_delta", | |
| "svd_relative_errors": null | |
| }, | |
| { | |
| "layer_idx": 17, | |
| "new_parameter_count": 113736, | |
| "new_tensors": { | |
| "beta_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "beta_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": -7.345043286477448e-06, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012014731764793396 | |
| }, | |
| "decay_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": -0.10546875, | |
| "mean": -0.10546875, | |
| "min": -0.10546875, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "decay_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": -0.00011655782873276621, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012049020268023014 | |
| }, | |
| "out_norm": { | |
| "dtype": "torch.bfloat16", | |
| "max": 1.0, | |
| "mean": 1.0, | |
| "min": 1.0, | |
| "numel": 3072, | |
| "shape": [ | |
| 24, | |
| 128 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "out_scale": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| } | |
| }, | |
| "operator": "gated_delta", | |
| "svd_relative_errors": null | |
| }, | |
| { | |
| "layer_idx": 23, | |
| "new_parameter_count": 113736, | |
| "new_tensors": { | |
| "beta_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "beta_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": -0.00015490187797695398, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.012007065117359161 | |
| }, | |
| "decay_bias": { | |
| "dtype": "torch.bfloat16", | |
| "max": -0.10546875, | |
| "mean": -0.10546875, | |
| "min": -0.10546875, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "decay_proj.weight": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.020751953125, | |
| "mean": -2.7684516680892557e-05, | |
| "min": -0.0208740234375, | |
| "numel": 55296, | |
| "shape": [ | |
| 24, | |
| 2304 | |
| ], | |
| "std": 0.01205902174115181 | |
| }, | |
| "out_norm": { | |
| "dtype": "torch.bfloat16", | |
| "max": 1.0, | |
| "mean": 1.0, | |
| "min": 1.0, | |
| "numel": 3072, | |
| "shape": [ | |
| 24, | |
| 128 | |
| ], | |
| "std": 0.0 | |
| }, | |
| "out_scale": { | |
| "dtype": "torch.bfloat16", | |
| "max": 0.0, | |
| "mean": 0.0, | |
| "min": 0.0, | |
| "numel": 24, | |
| "shape": [ | |
| 24 | |
| ], | |
| "std": 0.0 | |
| } | |
| }, | |
| "operator": "gated_delta", | |
| "svd_relative_errors": null | |
| } | |
| ], | |
| "load_strategy": "base_class_then_patch_in_place", | |
| "loading": { | |
| "mismatched_keys": 0, | |
| "missing_keys": 0, | |
| "unexpected_keys": 0 | |
| }, | |
| "non_claims": [ | |
| "The artifact is a converted BF16 checkpoint; it is not a measured quality, latency or energy result.", | |
| "The patched operators are freshly initialized; no healing or post-training has been applied.", | |
| "Preservation proves that the untouched base tensors are bit-identical; it does not prove that the patched operators reproduce base behaviour." | |
| ], | |
| "output": "/Users/kearm/.cache/alphaheng/artifacts/inkling2-mini-gateddelta-all-bf16", | |
| "parameters": { | |
| "added": 454944, | |
| "base_total": 26386415616, | |
| "patched_total": 26386870560 | |
| }, | |
| "patch_config": { | |
| "delta_beta_init": 0.0, | |
| "delta_chunk_size": 64, | |
| "delta_decay_init": -0.1053605, | |
| "init_seed": 20261124, | |
| "kernel_backend": "recurrent", | |
| "latent_rank": 512, | |
| "operator": "gated_delta", | |
| "operators": null, | |
| "out_gate_init": "zero", | |
| "patched_layer_ids": [ | |
| 5, | |
| 11, | |
| 17, | |
| 23 | |
| ], | |
| "state_mode": "reset" | |
| }, | |
| "patched_config_model_type": "inkling2_loop", | |
| "preservation": { | |
| "added_keys": [ | |
| "model.language_model.layers.11.self_attn.beta_bias", | |
| "model.language_model.layers.11.self_attn.beta_proj.weight", | |
| "model.language_model.layers.11.self_attn.decay_bias", | |
| "model.language_model.layers.11.self_attn.decay_proj.weight", | |
| "model.language_model.layers.11.self_attn.out_norm", | |
| "model.language_model.layers.11.self_attn.out_scale", | |
| "model.language_model.layers.17.self_attn.beta_bias", | |
| "model.language_model.layers.17.self_attn.beta_proj.weight", | |
| "model.language_model.layers.17.self_attn.decay_bias", | |
| "model.language_model.layers.17.self_attn.decay_proj.weight", | |
| "model.language_model.layers.17.self_attn.out_norm", | |
| "model.language_model.layers.17.self_attn.out_scale", | |
| "model.language_model.layers.23.self_attn.beta_bias", | |
| "model.language_model.layers.23.self_attn.beta_proj.weight", | |
| "model.language_model.layers.23.self_attn.decay_bias", | |
| "model.language_model.layers.23.self_attn.decay_proj.weight", | |
| "model.language_model.layers.23.self_attn.out_norm", | |
| "model.language_model.layers.23.self_attn.out_scale", | |
| "model.language_model.layers.5.self_attn.beta_bias", | |
| "model.language_model.layers.5.self_attn.beta_proj.weight", | |
| "model.language_model.layers.5.self_attn.decay_bias", | |
| "model.language_model.layers.5.self_attn.decay_proj.weight", | |
| "model.language_model.layers.5.self_attn.out_norm", | |
| "model.language_model.layers.5.self_attn.out_scale" | |
| ], | |
| "compared_keys": 1099, | |
| "dropped_keys": [ | |
| "model.language_model.layers.11.self_attn.relative_position_bias.linear.weight", | |
| "model.language_model.layers.11.self_attn.relative_position_bias.norm.scale", | |
| "model.language_model.layers.11.self_attn.relative_position_bias.proj", | |
| "model.language_model.layers.11.self_attn.sink_proj.weight", | |
| "model.language_model.layers.17.self_attn.relative_position_bias.linear.weight", | |
| "model.language_model.layers.17.self_attn.relative_position_bias.norm.scale", | |
| "model.language_model.layers.17.self_attn.relative_position_bias.proj", | |
| "model.language_model.layers.17.self_attn.sink_proj.weight", | |
| "model.language_model.layers.23.self_attn.relative_position_bias.linear.weight", | |
| "model.language_model.layers.23.self_attn.relative_position_bias.norm.scale", | |
| "model.language_model.layers.23.self_attn.relative_position_bias.proj", | |
| "model.language_model.layers.23.self_attn.sink_proj.weight", | |
| "model.language_model.layers.5.self_attn.relative_position_bias.linear.weight", | |
| "model.language_model.layers.5.self_attn.relative_position_bias.norm.scale", | |
| "model.language_model.layers.5.self_attn.relative_position_bias.proj", | |
| "model.language_model.layers.5.self_attn.sink_proj.weight" | |
| ], | |
| "max_abs_diff": 0.0, | |
| "mismatches": 0, | |
| "reference_file_keys": 1115, | |
| "replaced_layer_roles": [ | |
| { | |
| "layer_idx": 5, | |
| "roles": { | |
| "k_proj": { | |
| "compared_keys": 5 | |
| }, | |
| "o_proj": { | |
| "compared_keys": 2 | |
| }, | |
| "q_proj": { | |
| "compared_keys": 4 | |
| }, | |
| "v_proj": { | |
| "compared_keys": 5 | |
| } | |
| } | |
| }, | |
| { | |
| "layer_idx": 11, | |
| "roles": { | |
| "k_proj": { | |
| "compared_keys": 5 | |
| }, | |
| "o_proj": { | |
| "compared_keys": 2 | |
| }, | |
| "q_proj": { | |
| "compared_keys": 4 | |
| }, | |
| "v_proj": { | |
| "compared_keys": 5 | |
| } | |
| } | |
| }, | |
| { | |
| "layer_idx": 17, | |
| "roles": { | |
| "k_proj": { | |
| "compared_keys": 5 | |
| }, | |
| "o_proj": { | |
| "compared_keys": 2 | |
| }, | |
| "q_proj": { | |
| "compared_keys": 4 | |
| }, | |
| "v_proj": { | |
| "compared_keys": 5 | |
| } | |
| } | |
| }, | |
| { | |
| "layer_idx": 23, | |
| "roles": { | |
| "k_proj": { | |
| "compared_keys": 3 | |
| }, | |
| "o_proj": { | |
| "compared_keys": 2 | |
| }, | |
| "q_proj": { | |
| "compared_keys": 2 | |
| }, | |
| "v_proj": { | |
| "compared_keys": 3 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "published_code": { | |
| "auto_map": { | |
| "AutoConfig": "modeling_inkling2_loop_patched.Inkling2LoopPatchedConfig", | |
| "AutoModelForCausalLM": "modeling_inkling2_loop_patched.Inkling2LoopPatchedForCausalLM", | |
| "AutoModelForImageTextToText": "modeling_inkling2_loop_patched.Inkling2LoopPatchedForConditionalGeneration" | |
| }, | |
| "layout": "self-contained", | |
| "modeling": "modeling_inkling2_loop_patched.py" | |
| }, | |
| "quantization_config_cleared": true, | |
| "schema": "inkling2-loop-patch-manifest/1", | |
| "tool": { | |
| "platform": "macOS-26.7.1-arm64-arm-64bit", | |
| "python": "3.12.16", | |
| "torch": "2.15.0", | |
| "transformers": "5.24.1" | |
| }, | |
| "verification": { | |
| "allclose": true, | |
| "atol": 0.02, | |
| "batch": 2, | |
| "length": 8, | |
| "max_abs_diff": 0.0, | |
| "patch_structure": { | |
| "11": "Inkling2LoopGatedDeltaAttention", | |
| "17": "Inkling2LoopGatedDeltaAttention", | |
| "23": "Inkling2LoopGatedDeltaAttention", | |
| "5": "Inkling2LoopGatedDeltaAttention" | |
| }, | |
| "quantization_config": null, | |
| "reloaded_attn_implementation": "eager", | |
| "reloaded_class": "Inkling2LoopPatchedForConditionalGeneration", | |
| "reloaded_config_class": "Inkling2LoopPatchedConfig", | |
| "rtol": 0.01, | |
| "seed": 20261124, | |
| "sensitivity_floor": 3.322834014892578, | |
| "tolerance": 3.322834014892578 | |
| } | |
| } | |