๐Ÿฅ— Astra Meal Parser โ€” GGUF (Q4_K_M)

GGUF build of Turhan123/astra-meal-parser, quantized to Q4_K_M (~1.9 GB) for local and on-device inference with llama.cpp, Ollama, or llama-cpp-python.

The model reads a free-text meal description in Turkish or English and returns a structured list of food items and their amounts. It does not compute calories or macros โ€” those are produced downstream by a nutrition table + calculator. See the full model card for training and evaluation details.

Base model Turhan123/astra-meal-parser (Qwen2.5-3B)
Quantization Q4_K_M
File astra-meal-parser-q4_k_m.gguf (~1.9 GB)
Context 2048

Output format

The model returns only a strict JSON object:

{"items": [{"name": "string", "amount": "string"}]}

No prose, no markdown, no macros.

System prompt

You are a meal parser. Extract every food item and its amount from the user's meal
description (Turkish or English). Return ONLY a strict JSON object of the form
{"items": [{"name": string, "amount": string}]}. No macros, no calories, no
conversational text, no markdown, only valid JSON.

Usage

Ollama

Create a Modelfile:

FROM ./astra-meal-parser-q4_k_m.gguf

TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>
"""

SYSTEM """You are a meal parser. Extract every food item and its amount from the user's meal description (Turkish or English). Return ONLY a strict JSON object of the form {"items": [{"name": string, "amount": string}]}. No macros, no calories, no conversational text, no markdown, only valid JSON."""

PARAMETER temperature 0
PARAMETER stop "<|im_end|>"

Then:

ollama create astra-parser -f Modelfile
ollama run astra-parser "2 yumurta, 100g tavuk gรถฤŸsรผ ve 1 muz"

llama.cpp

# download the GGUF
huggingface-cli download Turhan123/astra-meal-parser-gguf \
  astra-meal-parser-q4_k_m.gguf --local-dir .

# run a local OpenAI-compatible server
llama-server -m astra-meal-parser-q4_k_m.gguf -c 2048

llama-cpp-python

from llama_cpp import Llama

llm = Llama(model_path="astra-meal-parser-q4_k_m.gguf", n_ctx=2048)

SYSTEM = (
    "You are a meal parser. Extract every food item and its amount from the user's "
    "meal description (Turkish or English). Return ONLY a strict JSON object of the form "
    '{"items": [{"name": string, "amount": string}]}. '
    "No macros, no calories, no conversational text, no markdown, only valid JSON."
)

out = llm.create_chat_completion(
    messages=[{"role": "system", "content": SYSTEM},
              {"role": "user", "content": "2 yumurta, 100g tavuk gรถฤŸsรผ ve 1 muz"}],
    temperature=0,
)
print(out["choices"][0]["message"]["content"])

Performance notes

  • Q4_K_M keeps quality very close to the full model while cutting size to ~1.9 GB.
  • Runs comfortably on CPU; a parsing call returns a short JSON object, so latency stays low even without a GPU.

Limitations

Parsing only โ€” calorie/macro accuracy depends on the accompanying nutrition table and calculator. Vague portions are resolved with default serving sizes. See the full model card for evaluation results and the full list of limitations.

License

Fine-tuned from Qwen/Qwen2.5-3B-Instruct; use is subject to the Qwen Research License.

Downloads last month
111
GGUF
Model size
3B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Turhan123/astra-meal-parser-gguf

Base model

Qwen/Qwen2.5-3B
Quantized
(1)
this model