Image-Text-to-Text
Transformers
Safetensors
inkling2_loop
conversational
Mixture of Experts
modelopt
Instructions to use flintglass/Inkling-2-Mini-PrismSQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/Inkling-2-Mini-PrismSQL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="flintglass/Inkling-2-Mini-PrismSQL") 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("flintglass/Inkling-2-Mini-PrismSQL") model = AutoModelForMultimodalLM.from_pretrained("flintglass/Inkling-2-Mini-PrismSQL", 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 flintglass/Inkling-2-Mini-PrismSQL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/Inkling-2-Mini-PrismSQL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/Inkling-2-Mini-PrismSQL", "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/flintglass/Inkling-2-Mini-PrismSQL
- SGLang
How to use flintglass/Inkling-2-Mini-PrismSQL 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 "flintglass/Inkling-2-Mini-PrismSQL" \ --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": "flintglass/Inkling-2-Mini-PrismSQL", "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 "flintglass/Inkling-2-Mini-PrismSQL" \ --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": "flintglass/Inkling-2-Mini-PrismSQL", "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 flintglass/Inkling-2-Mini-PrismSQL with Docker Model Runner:
docker model run hf.co/flintglass/Inkling-2-Mini-PrismSQL
Upload Flintglass Inkling-2-Mini-PrismSQL BF16 part 2/2 (shards 7-13)
Browse filesFiles changed (7)
123version https://git-lfs.github.com/spec/v1oid sha256:8a508dd279e1ca02140887f1b28a1eaed843579a5bcb8d42870b8332b667155csize 4185822176123version https://git-lfs.github.com/spec/v1oid sha256:8c94d2fe8cb1738f7b2de8621b15bd6d32b3bd5d71a3ae2d8cfb57677e2d2b61size 4185822192123version https://git-lfs.github.com/spec/v1oid sha256:956d79ad24280a52aaa4526d6db74beedbf2c264bd35775389a353fa7f42e573size 4186126776123version https://git-lfs.github.com/spec/v1oid sha256:68161d66bda7e408c11bb256ab958234be2007601a35536b9099d7d53a9ba7ccsize 4186117312123version https://git-lfs.github.com/spec/v1oid sha256:761e0f857e8d9202d5912238b8fa18281ce947a79e7b3534de32591846921277size 4195271696123version https://git-lfs.github.com/spec/v1oid sha256:ebae23e0d1f108c148da075055910cfb4988ca735d024773dedb25f1768adef5size 4195262264123version https://git-lfs.github.com/spec/v1oid sha256:9d3be5dc26c7771fc97723c6910f9d65b22376e8debe021e998f935602b015d6size 2243421648model-00007-of-00013.safetensorsAdded+3
model-00008-of-00013.safetensorsAdded+3
model-00009-of-00013.safetensorsAdded+3
model-00010-of-00013.safetensorsAdded+3
model-00011-of-00013.safetensorsAdded+3
model-00012-of-00013.safetensorsAdded+3
model-00013-of-00013.safetensorsAdded+3