Instructions to use cogni-x/nutrition-model-q4-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use cogni-x/nutrition-model-q4-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf cogni-x/nutrition-model-q4-gguf # Run inference directly in the terminal: llama cli -hf cogni-x/nutrition-model-q4-gguf
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf cogni-x/nutrition-model-q4-gguf # Run inference directly in the terminal: llama cli -hf cogni-x/nutrition-model-q4-gguf
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf cogni-x/nutrition-model-q4-gguf # Run inference directly in the terminal: ./llama-cli -hf cogni-x/nutrition-model-q4-gguf
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf cogni-x/nutrition-model-q4-gguf # Run inference directly in the terminal: ./build/bin/llama-cli -hf cogni-x/nutrition-model-q4-gguf
Use Docker
docker model run hf.co/cogni-x/nutrition-model-q4-gguf
- LM Studio
- Jan
- vLLM
How to use cogni-x/nutrition-model-q4-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cogni-x/nutrition-model-q4-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cogni-x/nutrition-model-q4-gguf", "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/cogni-x/nutrition-model-q4-gguf
- Ollama
How to use cogni-x/nutrition-model-q4-gguf with Ollama:
ollama run hf.co/cogni-x/nutrition-model-q4-gguf
- Unsloth Desktop
- Pi
How to use cogni-x/nutrition-model-q4-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cogni-x/nutrition-model-q4-gguf
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "cogni-x/nutrition-model-q4-gguf" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use cogni-x/nutrition-model-q4-gguf with Docker Model Runner:
docker model run hf.co/cogni-x/nutrition-model-q4-gguf
- Lemonade
How to use cogni-x/nutrition-model-q4-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cogni-x/nutrition-model-q4-gguf
Run and chat with the model
lemonade run user.nutrition-model-q4-gguf-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use cogni-x/nutrition-model-q4-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cogni-x/nutrition-model-q4-gguf
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default cogni-x/nutrition-model-q4-gguf
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use cogni-x/nutrition-model-q4-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cogni-x/nutrition-model-q4-gguf
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "cogni-x/nutrition-model-q4-gguf" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
🍽️ Food Analyzer — GGUF Q4_K_M
A quantized GGUF version of Ateeqq/food-analysis, ready for local inference via llama.cpp.
This model analyzes food images and returns structured nutritional information as a JSON object — including dish name, cooking method, calorie estimates, and macronutrient breakdown.
🧩 Model Details
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-VL-2B-Instruct |
| Fine-tune Source | Ateeqq/food-analysis (LoRA) |
| Fine-tune Method | LoRA (merged & exported) |
| Quantization | Q4_K_M |
| Format | GGUF |
| File Size | ~1.05 GB |
| Original Size (F16) | ~3.4 GB |
| Modality | Image + Text |
| Output Format | JSON |
| License | openrail |
🧠 Capabilities
- 🍕 Food Recognition — Identifies dish name and meal type (homemade, restaurant, etc.)
- 🔥 Calorie Estimation — Predicts total calories per serving
- 🥗 Macronutrient Breakdown — Protein, carbohydrates, and fat in grams
- 🍳 Cooking Method Detection — Boiled, fried, grilled, baked, mixed, etc.
- 📏 Portion Estimation — Approximates ingredient quantities
📦 Files
| File | Quantization | Size |
|---|---|---|
food-analysis-q4.gguf |
Q4_K_M | ~1.05 GB |
🚀 Usage with llama.cpp
1. Download
huggingface-cli download cogni-x/nutrition-model-q4-gguf food-analysis-q4.gguf --local-dir .
2. Run inference
./llama-cli \
-m food-analysis-q4.gguf \
--image /path/to/food.jpg \
-p "As a food-analyzer AI, analyze the image and return a single JSON object containing nutritional information. Respond with JSON only. No extra text." \
-n 512
📤 Example Output
{
"dish_name": "Vegetable Bowl",
"food_type": "Homemade food",
"cooking_method": "boiled and mixed",
"nutritional_summary": {
"calories_kcal": 500,
"protein_g": 20.0,
"carbohydrate_g": 70.0,
"fat_g": 15.0
},
"portion_size": {
"quinoa": 200,
"vegetables": 300,
"sauce": 50
}
}
⚙️ Quantization Details
This model was quantized using llama.cpp:
# Step 1: Merge LoRA adapter with base model
python convert_hf_to_gguf.py ./food-analysis-merged --outfile food-analysis.gguf
# Step 2: Quantize to Q4_K_M
./llama-quantize food-analysis.gguf food-analysis-q4.gguf Q4_K_M
Q4_K_M uses 4-bit quantization with K-quants for higher accuracy on key weight matrices, providing a good balance between file size (~1 GB) and quality.
🔗 Related
- Original LoRA adapter: Ateeqq/food-analysis
- Base model: Qwen/Qwen3-VL-2B-Instruct
- Training dataset: Codatta/MM-Food-100K
- Colab demo: Open in Colab
📜 Citation
@misc{food_analyzer_qwen3_vl,
author = {Muhammad Ateeq},
title = {Food Analyzer Vision-Language Model},
year = {2026},
base_model = {Qwen3-VL-2B-Instruct}
}
- Downloads last month
- 22
We're not able to determine the quantization variants.