Image-Text-to-Text
Transformers
Safetensors
English
inkling2_loop_v18
inkling2
mixture-of-experts
multimodal
external-memory
custom_code
uncensored
conversational
8-bit precision
modelopt
Instructions to use LTM-Lab/Inkling-2-Mini-Uncensored-V18 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-V18 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-V18", 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-V18", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LTM-Lab/Inkling-2-Mini-Uncensored-V18 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-V18" # 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-V18", "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-V18
- SGLang
How to use LTM-Lab/Inkling-2-Mini-Uncensored-V18 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-V18" \ --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-V18", "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-V18" \ --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-V18", "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-V18 with Docker Model Runner:
docker model run hf.co/LTM-Lab/Inkling-2-Mini-Uncensored-V18
File size: 3,956 Bytes
cc31783 | 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 | {
"architecture": "Inkling2LoopForConditionalGeneration",
"architecture_files": [
"configuration_inkling2_loop_v18.py",
"modeling_inkling2_loop_v18.py",
"memory_v18.py",
"runtime_v18.py",
"store_v18.py"
],
"backbone": {
"resources": {
"chat_template.jinja": "7eb18354abf329aa0fa7665af617536cdbfc4278b3767b45c70e03026de8bb96",
"config.json": "106157b0f7caf4f41572f89a071651fcdb8a6da44bd2fd648af9905c7d762531",
"generation_config.json": "7ecdc95d3b44df2b120ebb0cc5a291757466ddebeb31f512704ed67e0f595980",
"hf_quant_config.json": "7ccbb2b6190ecafdc314826153dded3b05f9e533822b435d828840279e0ef5c9",
"model.safetensors.index.json": "ba3150b2f2f8eddd1bb19acf56290c0a33b57015dbfc214b99108a758df34341",
"processor_config.json": "1f8351b21c4e9f54d1f6629437f8857c608eb25b6df85e1a9048c4c7d3679c2b",
"special_tokens_map.json": "c0d2f34d84de6c72f99ceaf0d82ee35453330ecc33261e99c1d1a7987e6e411a",
"tiktoken/tokenizer.model": "f170372dd655728909228220d77cf6b8104a59f38a91262a7d2c4027906ec0d8",
"tokenizer.json": "7f332727f9a3f093dd452a39cc978e6757627e5dad1b0673aa4e75174f236dd6",
"tokenizer_config.json": "7cfea5d6f0711ee5609c682feae266d3ad2693d639eb3ac69bc2236cf7633002"
},
"weights": {
"model-00001-of-00001.safetensors": "a841d90643aec49a9dd07968ee96a26fe0a9d829d0f27901ebb5cb3938c99227",
"mtp.safetensors": "7c3b651317f01f73bcf4e1dceba66ef8b7e1a1eac6bc171e882e690a4b10a1d2"
}
},
"backbone_id": "e2c64048619de2bd7e217656ec57338d06ab214ee6033177459315df4f750ff0",
"files": {
"LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
"README.md": "59e7f37538b1df32a6be9e17dee00a2e1cc0a3389bca382c0f9823b6997cf111",
"chat_template.jinja": "7eb18354abf329aa0fa7665af617536cdbfc4278b3767b45c70e03026de8bb96",
"config.json": "4bd02805d69beef8e25839d603dd562f62e497b764b5a92a0d5759d2aa67799e",
"configuration_inkling2_loop_v18.py": "8bfb255c7f92d10850be019131396c26e6cb69c733d1505296ed775d4433225b",
"generation_config.json": "7ecdc95d3b44df2b120ebb0cc5a291757466ddebeb31f512704ed67e0f595980",
"hf_quant_config.json": "7ccbb2b6190ecafdc314826153dded3b05f9e533822b435d828840279e0ef5c9",
"memory_v18.py": "b5acc06d8c88483c6850e3aded663ee2925776045d67fa500e101e52877b8955",
"model-00001-of-00001.safetensors": "a841d90643aec49a9dd07968ee96a26fe0a9d829d0f27901ebb5cb3938c99227",
"model-v18-memory.safetensors": "e0f8dcd4b731c7a3a83f5d43fa7958c2e0760dc45a9490beb487d2212bc3baae",
"model.safetensors.index.json": "64e25c62758b259104f6e7af0a62da8d2436e8b7f97d7ccfa78a2ed5502c80b7",
"modeling_inkling2_loop_v18.py": "3e168ec81fff01513daa7419f19ad9c9c1c33a6e87d21754e1abfc6aa06214d4",
"mtp.safetensors": "7c3b651317f01f73bcf4e1dceba66ef8b7e1a1eac6bc171e882e690a4b10a1d2",
"processor_config.json": "1f8351b21c4e9f54d1f6629437f8857c608eb25b6df85e1a9048c4c7d3679c2b",
"runtime_v18.py": "d129603149e66eda21cbbb25ff8d6a7cfc8f7b0d2a5ed56c850c259c1c8aed2b",
"special_tokens_map.json": "c0d2f34d84de6c72f99ceaf0d82ee35453330ecc33261e99c1d1a7987e6e411a",
"store_v18.py": "c1fa1ea7ff861323b668b7a1af9025ee1dc400354fe9e448bd0039feaa01daa5",
"tiktoken/tokenizer.model": "f170372dd655728909228220d77cf6b8104a59f38a91262a7d2c4027906ec0d8",
"tokenizer.json": "7f332727f9a3f093dd452a39cc978e6757627e5dad1b0673aa4e75174f236dd6",
"tokenizer_config.json": "7cfea5d6f0711ee5609c682feae266d3ad2693d639eb3ac69bc2236cf7633002"
},
"format_version": 2,
"init_seed": null,
"initialization": "adapter",
"keyspace_id": "e2c64048619de2bd7e217656ec57338d06ab214ee6033177459315df4f750ff0:75dfcd1eb58786af45ee9ce4744c066aaa2ac5f92fdf6562524158217cfdbe52",
"memory_tensors_sha256": "75dfcd1eb58786af45ee9ce4744c066aaa2ac5f92fdf6562524158217cfdbe52",
"transformers_v18_fork_required": false,
"weights_sha256": "75dfcd1eb58786af45ee9ce4744c066aaa2ac5f92fdf6562524158217cfdbe52"
}
|