Image-Text-to-Text
Transformers
Safetensors
inkling2_loop_v20
inkling2
multimodal
memory
continual-learning
long-term-memory
safetensors-memory-state
sglang
dpo
uncensored
custom_code
conversational
8-bit precision
modelopt
Instructions to use LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3", 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 AutoModelForMultimodalLM model = AutoModelForMultimodalLM.from_pretrained("LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3", "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/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3
- SGLang
How to use LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 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 "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3" \ --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": "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3", "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 "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3" \ --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": "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3", "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 LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 with Docker Model Runner:
docker model run hf.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3
Download config.json from LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3: direct link, hf CLI and curl.
- Browser
- Download file 4.16 kB
-
https://huggingface.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3/resolve/main/config.json
- Command line
-
hf download hf://LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3/config.json
-
curl -L -o config.json https://huggingface.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3/resolve/main/config.json
4.16 kB
| { | |
| "architectures": [ | |
| "Inkling2LoopForConditionalGeneration" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_inkling2_loop_v20.Inkling2LoopConfig", | |
| "AutoModel": "modeling_inkling2_loop_v20.Inkling2LoopModel", | |
| "AutoModelForImageTextToText": "modeling_inkling2_loop_v20.Inkling2LoopForConditionalGeneration", | |
| "AutoModelForMultimodalLM": "modeling_inkling2_loop_v20.Inkling2LoopForConditionalGeneration" | |
| }, | |
| "eos_token_id": 200006, | |
| "model_type": "inkling2_loop_v20", | |
| "mtp_config": { | |
| "block_size": 8, | |
| "head_dim": 128, | |
| "hidden_size": 2304, | |
| "intermediate_size": 9216, | |
| "local_layer_ids": [ | |
| 0, | |
| 2 | |
| ], | |
| "markov_head_type": "rnn_hidden", | |
| "markov_rank": 256, | |
| "max_position_embeddings": 1048576, | |
| "num_attention_heads": 24, | |
| "num_hidden_layers": 3, | |
| "num_key_value_heads": 8, | |
| "o_bias": false, | |
| "q_bias": false, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 1000000.0, | |
| "sliding_window_size": 1024, | |
| "target_layer_ids": [ | |
| 5, | |
| 35, | |
| 65, | |
| 72 | |
| ], | |
| "torch_dtype": "bfloat16" | |
| }, | |
| "quantization_config": { | |
| "quant_algo": "NVFP4", | |
| "quant_method": "modelopt" | |
| }, | |
| "text_config": { | |
| "attn_res_normalize_values": true, | |
| "d_rel": 16, | |
| "final_logit_softcapping": 30.0, | |
| "head_dim": 128, | |
| "hidden_size": 2304, | |
| "intermediate_size": 1152, | |
| "local_layer_ids": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22 | |
| ], | |
| "log_scaling_alpha": 0.1, | |
| "log_scaling_n_floor": 8192, | |
| "loop_config": { | |
| "core_end": 18, | |
| "core_start": 6, | |
| "gate_rank": 64, | |
| "is_varloop": false, | |
| "num_passes": 5 | |
| }, | |
| "mlp_gate_softcap": 4.0, | |
| "mlp_up_softcap": 25.0, | |
| "model_max_length": 1048576, | |
| "model_type": "inkling2_loop_v20_text", | |
| "n_layers_per_attn_res_block": 6, | |
| "n_routed_experts": 128, | |
| "n_shared_experts": 0, | |
| "num_attention_heads": 24, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 24, | |
| "num_key_value_heads": 8, | |
| "o_bias": false, | |
| "q_bias": false, | |
| "qk_l2_clip_threshold": 22.627416997969522, | |
| "rel_extent": 1024, | |
| "rel_l2_clip_threshold": 8.0, | |
| "rms_norm_eps": 1e-06, | |
| "route_scale": 8.0, | |
| "sconv_kernel_size": 4, | |
| "sliding_window_size": 1024, | |
| "swa_head_dim": 128, | |
| "swa_num_attention_heads": 24, | |
| "swa_num_key_value_heads": 8, | |
| "torch_dtype": "bfloat16", | |
| "unpadded_vocab_size": 200058, | |
| "use_gate_bias": true, | |
| "use_value_norm_no_gamma": true, | |
| "v20_encoder_conv_kernel": 4, | |
| "v20_encoder_dim": 768, | |
| "v20_encoder_heads": 12, | |
| "v20_encoder_layers": 4, | |
| "v20_key_dim": 256, | |
| "v20_max_pass_embeddings": 10, | |
| "v20_memory_enabled": true, | |
| "v20_readout_layer_offsets": [ | |
| 2, | |
| 5, | |
| 8, | |
| 11 | |
| ], | |
| "v20_region_dim": 128, | |
| "v20_state_chunk_size": 64, | |
| "v20_state_fast_heads": 32, | |
| "v20_state_heads": 64, | |
| "v20_state_key_dim": 128, | |
| "v20_state_value_dim": 256, | |
| "v20_text_regions": 16, | |
| "v20_use_stem_value_bypass": true, | |
| "vocab_size": 201024 | |
| }, | |
| "v20_index_keyspace_id": "ae29bd08c76bcd94eb43275dbe435de0219c0082837460baf9af0ba40b26bab1:0ea18db13238dbee56fc6036da10cdc3f11540ba9bc191d63e0207991ecbd925", | |
| "v20_keyspace_id": "ae29bd08c76bcd94eb43275dbe435de0219c0082837460baf9af0ba40b26bab1:9d2c681f8e976fb87d4f9ca5b6d100fc0614a8461b09f9ed8f103f63eb31ac6d", | |
| "v20_state_keyspace_id": "ae29bd08c76bcd94eb43275dbe435de0219c0082837460baf9af0ba40b26bab1:36c8aa091d97f7d1e442e876076a76aa5d0f8933fd72d17f76da49693d3489d6", | |
| "v20_stem_id": "ae29bd08c76bcd94eb43275dbe435de0219c0082837460baf9af0ba40b26bab1", | |
| "vision_config": { | |
| "adapter_merge_size": 2, | |
| "hidden_size": 1024, | |
| "layer_norm_eps": 1e-05, | |
| "mlp_ratio": 4.0, | |
| "model_type": "inkling2_vision", | |
| "native_patch_size": 20, | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 23, | |
| "posemb_grid_size": 32, | |
| "projection_hidden_dim": 4096, | |
| "projector_bias": false, | |
| "temporal_patch_size": 2, | |
| "text_hidden_size": 2304 | |
| } | |
| } | |