Run this model with HF Jobs
Run caveman-so/caveling-2-mini on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/caveman-so/caveling-2-mini. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/caveman-so/caveling-2-mini on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/caveman-so/caveling-2-mini. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/caveman-so/caveling-2-mini. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use caveman-so/caveling-2-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use caveman-so/caveling-2-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="caveman-so/caveling-2-mini", 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("caveman-so/caveling-2-mini", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("caveman-so/caveling-2-mini", trust_remote_code=True, 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 caveman-so/caveling-2-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "caveman-so/caveling-2-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "caveman-so/caveling-2-mini", "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/caveman-so/caveling-2-mini
- SGLang
How to use caveman-so/caveling-2-mini 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 "caveman-so/caveling-2-mini" \ --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": "caveman-so/caveling-2-mini", "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 "caveman-so/caveling-2-mini" \ --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": "caveman-so/caveling-2-mini", "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 caveman-so/caveling-2-mini with Docker Model Runner:
docker model run hf.co/caveman-so/caveling-2-mini
Awesome work on caveling-2-mini! Quick MLX config.json note + M4 Pro 2×2 results
Hi @caveman-so — first off, huge thanks for building and releasing caveling-2-mini in the open. You're doing awesome work here — cutting overthinking without slowing down decode is a massive win for local Apple Silicon users.
We just ran a pre-registered 2×2 benchmark on a Mac mini M4 Pro (64 GB) comparing caveling-2-mini against official Inkling-2-Mini across mtplx (MTP depth 3) and mlx-dspark + DFlash 2, and wanted to share one practical MLX compatibility note plus the numbers:
1. Small MLX compatibility finding (config.json)
mtplx currently rejects unmodified caveling-2-mini with trust-remote-code-refused, purely because config.json includes PyTorch auto_map (plus dtype and loopcd: {"mode": "off"}).
Removing those 3 keys makes config.json byte-identical to thinkingmachines/Inkling-2-Mini's config.json and lets both mtplx (21/21 greedy-exact MTP depth 3) and mlx-dspark serve caveling-2-mini natively with zero --trust-remote-code:
- "dtype": "bfloat16",
...
- "loopcd": {
- "mode": "off"
- },
- "auto_map": {
- "AutoModelForImageTextToText": "modeling_caveling_loopcd.CavelingLoopCDForConditionalGeneration",
- "AutoModelForCausalLM": "modeling_caveling_loopcd.CavelingLoopCDForCausalLM"
- }
If you ever publish an MLX-clean config variant (or branch), Mac users running mtplx wouldn't need a local symlink shim.
2. Quick M4 Pro benchmark highlights (LoopCD off, shared chat_template.jinja: low=0.2, high=0.9)
- Thinking-token reduction (high-effort SQL):
−47.6%onmtplx(352 → 190.5median) and−49.5%onmlx-dspark(370.5 → 220), with zero decode drag on either engine. - Combined winner (
caveling-2-minionmlx-dspark + DFlash 2vs officialInkling-2-Minionmtplx):- 21 chat prompts at high effort: 18.7 s → 5.7 s (
3.26×) (32/32 sanity checks passed in every cell). - 200 unseen-schema SQL tasks at low effort (
k=2, 4-DB adversarial SQLite verifier): −47.0% paired wall time (5.94 s → 3.21 s), accuracy held (21.50% → 21.75%,+0.25 pp, 95% CI−2.5 to +3.0).
- 21 chat prompts at high effort: 18.7 s → 5.7 s (
- One honest edge-case note at high effort (100 SQL tasks, descriptive):
caveling-2-miniscored 3–4 pp lower (within noise, Holmp=1.0; Base-DB tied41% vs 41%), and emittedORDER BY … LIMIT 1shortcuts on4.0%of tasks vs1.0%for officialInkling-2-Mini(none of the 10LIMIT 1answers across all 4 cells passed tie tests).
Thanks again for shipping such a sharp, useful model in the open — it's now our local default on Mac mini. Keep up the awesome work!
Full write-up + hashes: https://metaxito.com/research/01-local-2x2/
Dataset, JSONs & exact config.json diff: https://huggingface.co/datasets/metaxito/research-01-local-2x2
Thanks a lot for running the M4 Pro 2x2 benchmark and flagging the mtplx config issue!
We just added a dedicated no-remote-code branch on this repo specifically for mtplx, mlx-dspark, and any other runners that reject auto_map:
https://huggingface.co/caveman-so/caveling-2-mini/tree/no-remote-code
It has the exact same weights and mtp.safetensors as main, just with auto_map, loopcd, and modeling_caveling_loopcd.py removed so config.json matches Inkling-2-Mini byte for byte. Our MLX repos (caveman-so/caveling-2-mini-MLX-NVFP4 and caveman-so/caveling-2-mini-MLX-8bit) also ship without auto_map or loopcd.
Also appreciate the honest note on the high-effort edge cases, super useful feedback for our next training rounds!