Views
No views yet
| File | Base | Size | License | Notes |
|---|---|---|---|---|
astra-meal-parser-1.5b-q4_k_m.gguf | Qwen2.5-1.5B | ~1.0 GB | Apache 2.0 | Recommended / deployed — faster on CPU, trained on the expanded dataset |
astra-meal-parser-q4_k_m.gguf | Qwen2.5-3B | ~1.9 GB | Qwen Research | Legacy / archive |
| Metric | Value |
|---|---|
| Item Precision / Recall / F1 | 100% / 99% / 99% |
| Parse failures | 0 / 149 |
| Calorie MAPE | 1.9% |
| Protein / Carbs / Fat MAE | 0.3 g / 1.0 g / 0.3 g |
{"items": [{"name": "string", "amount": "string"}]}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.FROM ./astra-meal-parser-1.5b-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|>"1ollama create astra-parser -f Modelfile
2ollama run astra-parser "2 yumurta, 100g tavuk göğsü ve 1 muz"1huggingface-cli download Turhan123/astra-meal-parser-gguf \
2 astra-meal-parser-1.5b-q4_k_m.gguf --local-dir .
3
4llama-server -m astra-meal-parser-1.5b-q4_k_m.gguf -c 20481from llama_cpp import Llama
2
3llm = Llama(model_path="astra-meal-parser-1.5b-q4_k_m.gguf", n_ctx=2048, chat_format="chatml")
4
5SYSTEM = (
6 "You are a meal parser. Extract every food item and its amount from the user's "
7 "meal description (Turkish or English). Return ONLY a strict JSON object of the form "
8 '{"items": [{"name": string, "amount": string}]}. '
9 "No macros, no calories, no conversational text, no markdown, only valid JSON."
10)
11
12out = llm.create_chat_completion(
13 messages=[{"role": "system", "content": SYSTEM},
14 {"role": "user", "content": "2 yumurta, 100g tavuk göğsü ve 1 muz"}],
15 temperature=0, max_tokens=256, stop=["<|im_end|>"],
16)
17print(out["choices"][0]["message"]["content"])