Plum 1
Plum 1 estimates a meal's calories and macronutrients from one photo and writes the list of foods the app shows. It runs on a phone with 6 GB of RAM or more. It combines two models:
- Grape 1, a 94M-parameter image model (separate repository), which gives a plate total.
- A 0.8B vision-language model that does two jobs with the same weights:
- With its LoRA adapter off, it answers one 26-option question ("about how many calories?"). The answer is read from the probabilities of the option letters, and the expected value over the calorie bands is the model's total.
- With the adapter on, it writes the food list as JSON.
The Plum 1 total is 0.55 x Grape 1 + 0.45 x the 0.8B model's expected kcal. The food list is scaled so that its kcal sum equals this total, and each item's grams are scaled by the same factor. The meal's protein, carbs and fat are 0.7 x Grape 1's macro heads + 0.3 x the scaled list's sums, and each item's macros are rescaled per nutrient to sum to those totals. If the list is empty or sums to 0 kcal, the app shows one "Whole meal estimate" item instead.
Technical ID: plum-1.0-0.8b-q8_0. Parameters: 853M (0.8B model) + 94M (Grape 1) ≈ 0.95B, plus a 22 MB
adapter.
Output format (nutrition-json-v2)
The food list follows the app's nutrition-json-v2 contract:
- up to 7 items ordered by calories, plus an optional "Other small ingredients" item (at most 8 items in all);
- each item has
name,grams,calories,protein,carbsandfat; - plate totals are the sums.
{"items":[{"name":"grilled chicken","grams":150,"calories":248,"protein":46.5,"carbs":0,"fat":5.4},
{"name":"white rice","grams":180,"calories":234,"protein":4.9,"carbs":51.5,"fat":0.5}]}
The list prompt, the JSON grammar and the retry prompt are given below under "How to run". The list is written at temperature 0.1, with at most 1,536 tokens and one whole-meal retry if the first answer does not parse.
Files
| File | Role | Bytes | SHA-256 | License |
|---|---|---|---|---|
plum-1.0-0.8b-q8_0.gguf | 0.8B language model, Q8_0 | 811,843,104 | 7437fbc7eb832f37dc357d887a7690ac8f8fff3231bbf2d84289befbc6eeb702 | Open RAIL-M |
plum-1.0-list-lora-f16.gguf | Food-list LoRA adapter, F16 | 21,671,584 | 4d36138e1985721166b86d92b3e14604fc6a74cbf595c1df03f0528504f5156a | Open RAIL-M |
plum-1.0-mmproj-f16.gguf | Vision tower and projector, F16, unmodified from Qwen3.5-0.8B | 204,986,560 | dabac7a332e4cad267371bd7dd3583e89f355d3d3fc3c74925f33c275a84c511 | Apache 2.0 |
Grape 1 (grape-1.0-94m-fp16.onnx, separate repository) | Plate-total model | 187,559,154 | b11afe48113d474c3710319b817ed5aebcae267e5ba5571349c9531bfbe9a269 | Open RAIL-M |
The three Plum files total 1.04 GB, or 1.23 GB with Grape 1. The file names in this repository may differ from the names used during testing; the SHA-256 values are the reference.
How to run
The files work with llama.cpp at commit bf9a0cc or later, and with llama.rn on phones. Load the model, the
projector and the adapter once. Then set the adapter scale for each call:
- Total. Set the adapter scale to 0 and clear the cache.
- Prompt (Qwen3.5 chat template, thinking off): a system line asking for one option letter, then a user turn
with
<state>{"task": "Estimate the total calories of this meal photo.", "photo": <image>}</state>, the question "About how many calories (kcal) are in all the food on this plate together?", and 26 options A to Z. The options are bands with edges 0, 50, 100, 150, 200, 250, 300, 360, 420, 490, 560, 640, 730, 830, 940, 1,060, 1,200, 1,360, 1,540, 1,740, 1,970, 2,230, 2,520, 2,850, 3,200 and 3,600 kcal, plus "more than 3600 kcal". - Image: resize so both sides are multiples of 32 (Qwen smart-resize), with Pillow bicubic filtering.
- Readout: run one forward pass and take the next-token logits of the 26 letters. Use a logit bias on the letters and temperature 1 so that all 26 are visible, then renormalize over the letters.
- Expected kcal = sum of probability x band midpoint. The top band counts as 4,000 kcal.
- The exact prompt string is in
j5_prompt.txtin this repository.
- Prompt (Qwen3.5 chat template, thinking off): a system line asking for one option letter, then a user turn
with
- List. Set the adapter scale to 1 and clear the cache. Send the app prompt (
list_prompt.txt) with the photo, the JSON grammar (list_grammar.gbnf) and temperature 0.1. - Combine. Total = 0.55 x Grape 1 + 0.45 x the expected kcal. Scale the list to that total.
Two cautions:
- Set the adapter scale explicitly for every call. In the llama.cpp build we tested, the server flag meant to load an adapter without applying it still applied it.
- The model has recurrent state as well as attention state. Clear both (
clearCache(true)in llama.rn) after changing the adapter scale.
Results
Public benchmarks (PC)
These are scores on public photo sets, computed on a PC. They do not measure accuracy on users' own phone photos. Lower MAE is better. The full protocol (PlateBench) is in the paper.
Holdout slice, read once after every model choice was frozen (Plum 1 total):
| Set | Photos | kcal MAE [95% CI] | Median relative error | Within 20% | vs open CalorieK model |
|---|---|---|---|---|---|
| SNAPMe home meals (self-reported records) | 296 | 126.0 [111.6, 141.7] | 40.6% | 25.3% | -28.5 [-38.2, -19.2] |
| JFB calorie-app photos (human-corrected labels) | 200 | 133.4 [118.1, 148.5] | 25.4% | 39.5% | -36.7 [-53.9, -19.8] |
Macros with the blended rule above (MAE in grams, protein / carbs / fat): SNAPMe 7.3 / 15.7 / 7.6 (1,178 photos), JFB 9.7 / 15.0 / 9.2 (800 photos). These photos are outside the holdout slice above.
Other public tracks, kcal MAE / median relative error. SNAPMe and JFB here exclude the holdout photos:
| Set | Photos | Plum 1 | Open CalorieK model |
|---|---|---|---|
| Nutrition5k overhead (weighed) | 506 | 45.7 / 16% | 105.0 / 37% |
| Nutrition5k angled (weighed) | 675 | 43.9 / 17% | 57.2 / 24% |
| SNAPMe | 1,178 | 133.0 / 40% | 158.9 / 48% |
| JFB | 800 | 129.6 / 24% | 180.6 / 32% |
| OmniFood8K (weighed) | 2,368 | 175.6 / 43% | 228.1 / 57% |
| NutritionVerse (weighed, large arranged scenes) | 889 | 495.8 / 41% | 657.2 / 66% |
CalorieK was trained only on side views, so its overhead score mostly reflects the camera view. Under its own protocol it reproduces its published 56 kcal. These results come from the research pipeline on a PC. The Plum 1 rows use the research J5 outputs. On a 100-photo check, the shipped Q8_0 file differed from them by about 13 kcal per photo on average, with an MAE of 128.9 against 127.6.
On a phone (one device, 20 photos)
One iPhone 16 Pro Max (iOS 27.0, 8 GB), llama.rn with Metal and 4 threads, run sequentially with one shared JPEG decode. These are parity and latency checks on 20 public photos. They do not measure accuracy on a phone. Android was not measured.
- Parity with the PC reference. The 0.8B model's kcal differed by 0.48% on average (maximum 2.14%), and the Plum total by 0.24% (maximum 1.29%). All 20 food lists were valid JSON; 10 of 20 had exactly the PC text. There were no errors in the final run.
- Speed (medians, model load included). 11.15 s until the Plum total, 22.7 s until the full list. In batch runs, whose clocks exclude model load and the Grape 1 step, the medians were 8.0 s and 18.3 s.
- Memory. Peak physical footprint was about 1.7 to 1.9 GiB.
- Robustness. Stress runs had intermittent Metal command-buffer failures. Our app recreates the backend and retries once, then falls back to Grape 1 alone.
Limitations
- It is not medical or dietetic advice. See the use restrictions in
LICENSE.md(Attachment A). Do not use it for health, eligibility or insurance decisions about a person. - It underestimates large meals. The largest quarter of meals carries most of the error. On SNAPMe and JFB, the largest quarter of meals is underestimated by about 230 and 150 kcal on average.
- Relative error is large. On SNAPMe home meals the median photo is about 41% off.
- It cannot see hidden ingredients. Item names and grams can look right while oil and sauce are missing, so energy density comes out low.
- The reference values are imperfect. The public sets use weighed food, self-reported records or model-assisted labels, so part of the measured error belongs to the reference.
- Food names are short labels, not database entries. Item macros are scaled estimates.
Training
See the paper.
License and use restrictions
-
Weights: the fine-tuned model and the adapter are BigScience Open RAIL-M (
license: openrail), with Canivel LLC as licensor. The full text is inLICENSE.md. In short: commercial use and derivatives are allowed, and the use restrictions in Attachment A bind every user and redistributor, including hosted and API use. The vision projector file is an unmodified conversion of Qwen3.5-0.8B and stays under Apache 2.0 only. -
Use restrictions (Attachment A): the standard Open RAIL-M restrictions plus health restrictions that rule out:
- insulin or medication dosing;
- clinical nutrition management;
- medical diagnosis or medical decisions;
- presenting the outputs as exact or as medical or dietetic advice.
ACCEPTABLE_USE_POLICY.mdsummarizes Attachment A in plain language and adds no terms. The outputs are approximate estimates, not medical advice. -
Base models: the language model is a modified version of
OmniJev/OneJev1.5-0.8B, which is a fine-tune ofQwen/Qwen3.5-0.8B; both are Apache 2.0.LICENSE-APACHE-2.0andNOTICEare in this repository.
Citation
@misc{canivel2026grapeplum,
title = {Distributional Readouts Make Small Vision-Language Models Better Calorie Estimators},
author = {Canivel, Danilo},
year = {2026},
eprint = {TBD},
archivePrefix = {arXiv},
primaryClass = {cs.AI}
}