llmmm-recipes

llmmm-recipes predicts missing ingredients from a set of ingredient names. We trained its 1,515,006 parameters, including its weights and biases, from scratch on all 4,653,430 canonical recipe records. No pretrained checkpoint was used for initialization. It does not generate cooking instructions.

Try the public demo

Open the browser demo or download all 4,653,430 ingredient records. The demo uses the released supervised weights and full-corpus ingredient frequencies. Example pantries show precomputed results at once; an optional index download, whose size the demo states first, enables local browser search, with no login, API key or paid inference service.

The dataset contains normalized ingredient names, source-reported times and servings, source identifiers, recorded original links, the link each result card opens, and each recipe's recorded title and ingredient lines. It does not copy cooking instructions, descriptions or images. A card links to the recorded page or, for sites whose recorded pages failed a September 23 or 24, 2026 check that their archived copies passed, to the Internet Archive's copy; the dataset card states the rule. The link filter is enabled by default; records without a link remain available when disabled.

All records are checked against constraints, then at most 2,000 baseline-selected candidates receive learned scores. This is not a new quality benchmark or a guaranteed global learned top-k. The private catalog's recovery scores below do not measure this browser retrieval pipeline. Model weights and their terms are unchanged.

Finding recipes

This release also includes a constrained recipe finder and our own 705-parameter ranking policies. It retrieves existing recipes; it does not write new ones. Supply canonical ingredient names, a maximum source-reported total time, required or excluded ingredients, missing-item limits, servings, and an optional source-language code.

The text-backed Python finder requires an authorized local catalog, its verified metadata index, and the canonical recipe_ids.npz ingredient corpus. These data files are not included in this public model. The catalog contains 4,653,430 records, but only 681,275 have a known source total time. Unknown times do not pass a time limit. The repository's catalog builder reconstructs these files from authorized local sources; recipe_catalog.json records the measured coverage.

from ingredient_model.recipe_search import RecipeFinder, RecipeQuery

finder = RecipeFinder.from_pretrained(
    "incrediblecrab/llmmm-recipes",
    revision="v0.4.0-recipe-search",
    catalog_path="/private/recipe_search.sqlite",
    corpus_path="/private/recipe_ids.npz",
    token=False,
)
result = finder.search(RecipeQuery(
    ["chicken", "rice", "broccoli"],
    must_use=["chicken"],
    max_total_minutes=30,
    max_missing=2,
))
for recipe in result.recipes:
    print(recipe.title, recipe.total_minutes, recipe.missing_ingredients, recipe.source_url)

Returned records include source ingredients, separate quantity values, instructions, and warnings. Normalized ingredient matches are not a complete shopping list or an allergen-safety check. Missing units are not invented, inconsistent quantity arrays are not paired, and serving counts do not scale quantities or cooking time.

Ranking training and measured limits

The policies were initialized from scratch. Listwise supervised learning was followed by sampled-action REINFORCE with entropy regularization and a KL penalty to the supervised policy. Each stage used all 4,653,430 canonical records. Together, the stages produced 9,306,860 training queries and 18,613,720 sampled reinforcement actions. The reward is recovery of the source's canonical ingredient set, not human feedback. The source is deliberately inserted into sampled training/evaluation candidate sets; those sampled-ranking scores are not full-catalog search accuracy. recipe_training.json records coverage and the complete protocol.

The supervised policy is the default, selected on validation before test scoring. REINFORCE did not establish an additional paired validation gain. 1 RL validation request timed out; the cause was not isolated.

The separate live search evaluation did not insert the source recipe into retrieval. On 200 held-out test pantry queries, the selected policy recovered the source ingredient set in its top five 83.5% of the time. The source set reached the shortlist on 99.0% of queries. Median request time was 0.43s, with p95 2.05s; 0 timeouts and 0 constraint violations were observed. Full counts, failures, truncation and paired comparisons are in recipe_evaluation.json.

Compared with the heuristic, top-five source-set recovery changed by +8.0 percentage points (paired query-bootstrap CI95: 4.5 to 12.0 points).

162 of 200 test queries reached a retrieval budget. Request timings exclude initialization; this is a measured local run, not a service-level guarantee.

Validation and test pantry hashes are excluded from ranking-policy training. Recipes and duplicate families are not held out. These synthetic recovery measurements do not establish taste, cooking quality, unseen-recipe generalization or a service-level guarantee. Retrieval is bounded and reports when its shortlist or scan budget is reached. There is no silent fallback between learned and heuristic ranking.

Ingredient-model training evidence

Measure Verified count
Recipe records used in each epoch 4,653,430
Completed epochs 3
Recipe presentations across all epochs 13,960,290
Ingredient slots processed in each epoch 36,707,624
Optimizer steps 27,267
Recipe length, in canonical ingredients 1 to 98

Every record was processed once per epoch, including single-ingredient records, pairs and long ingredient lists. No sampling or length filters were applied. Different records can describe the same recipe.

All saved parameter tensors matched after export and reload. The reloaded model also matched the native predictor's logits on 192 synthetic contexts. These checks establish serialization fidelity, not prediction quality. training_verification.json contains the corpus hash, per-epoch coverage and reload evidence. training_manifest.json records settings and losses.

Ingredient-model evaluation status

This checkpoint has no held-out quality score. Training includes the rows previously held out for evaluation. The earlier completion results belong to v0.2.0-preview, not these weights. Measuring improvement requires new test recipes, with duplicate families and source overlap accounted for.

Ingredient-predictor usage

Install the inference implementation from its pinned source revision:

python -m pip install "ingredient-model[torch,hf] @ git+https://github.com/incrediblecrab/llmmm.git@2d9bd9a9ac59883f6a91a1070e4d9f19b2395406#subdirectory=model"
from ingredient_model.hub import IngredientPredictor

model = IngredientPredictor.from_pretrained(
    "incrediblecrab/llmmm-recipes",
    revision="v0.4.0-recipe-search",
    token=False,
)
print(model.recommend(["tomato", "basil"], top_k=10))

Ingredient prediction does not require the training corpus. Supply at least two distinct ingredient names from model.vocabulary; spaces can replace underscores. Unknown names raise an error, and recommendations exclude supplied ingredients. Scores are unnormalized logits, not calibrated probabilities.

Intended use and limits

For noncommercial research and education. No permissive weights license is granted. This package contains no source recipes, titles or cooking instructions. Predictions have not been validated for taste, allergies or food safety. Review the data provenance and applicable terms before redistribution or commercial use.

Acknowledgements

The ranking experiment uses REINFORCE (Ronald J. Williams), with a supervised warm-start and KL regularization. SQLite FTS5 supplies the ingredient-token retrieval index. These are method and implementation credits, not imported learned weights.

This project started with a replication and audit of Epicure by Jakub Radzikowski and Josef Chen. Their ingredient-embedding work and published source inventory informed that research. llmmm-recipes is a separately trained model with its own learned weights and biases, not a fine-tune of Epicure or another pretrained model.

The method draws on Transformer attention (Vaswani and coauthors), masked prediction in BERT (Devlin and coauthors), and work on attention over unordered sets (Lee and coauthors). Our implementation uses a standard Transformer encoder without positional encodings, rather than the Set Transformer reference architecture.

We credit the authors and curators of RecipeNLG and the other datasets in our source inventory. Epicure Cooc, Epicure Core and RecipeBERT were comparison models; their weights are not part of this checkpoint. The implementation uses PyTorch, and Hugging Face Hub hosts the release.

Ideas for using this model

  • Build a pantry search over an authorized recipe collection, showing source links, reported cooking times, missing canonical ingredients and data-quality warnings.

  • Compare supervised, reinforcement-trained and heuristic rankings on held-out queries. Keep the simpler policy when measured gains are not established.

  • Add ingredient autocomplete to a recipe editor. After a user enters at least two known ingredients, show ranked suggestions for them to accept or reject.

  • Expand an ingredient query against a recipe catalog. Use the suggested names to find related entries; the catalog supplies the recipes and instructions.

  • Use it in a learning experiment. Change the input ingredients and inspect how the rankings move, or compare it with popularity and co-occurrence baselines on genuinely new recipes.

Downloads last month
89
Safetensors
Model size
1.52M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using incrediblecrab/llmmm-recipes 1

Papers for incrediblecrab/llmmm-recipes