FlavorVector

FlavorVector Benchmarks

FlavorVector 10-Taste & Cuisine Coverage

FlavorVector is a standalone, local-first semantic cooking substitution, flavor-pairing, and pantry flavor-bridge engine grounded in food-science chemistry and volatile aroma compounds. This repository includes the complete codebase, Streamlit UI, FastAPI service, pre-indexed ChromaDB database, and bundled transformer weights for offline execution.

Repository Contents

  • models/bi_encoder/ β€” Bundled BAAI/bge-base-en-v1.5 dense retrieval model (~438 MB).
  • models/cross_encoder/ β€” Bundled cross-encoder/ms-marco-MiniLM-L-6-v2 reranker (~91 MB).
  • chroma_db/ β€” Pre-built persistent vector store (143 vectors across flavor_substitutions and flavor_pairings).
  • flavor_atlas.json β€” Exported structured food-science substitution rules and ingredient compound profiles.
  • app/ β€” Core retrieval engine (engine.py), live web synthesis (live_fetcher.py), ratio scaler (balancer.py), and FastAPI endpoints (main.py).
  • streamlit_app.py β€” Interactive Streamlit dashboard with 10-taste Plotly radar charts.
  • scripts/ & tests/ β€” Atlas builders, 25-case benchmark runner, PNG chart generator, and pytest suite.

Evaluation Benchmarks

Benchmarked across 25 culinary edge cases on NVIDIA GeForce RTX 5060 Laptop GPU:

Category Metric Stage 1 (bge-base-en-v1.5) Two-Stage (+ Cross-Encoder)
Accuracy Hit Rate@1 100.0% 100.0%
Accuracy Hit Rate@3 100.0% 100.0%
Ranking Quality Mean Reciprocal Rank (MRR) 100.0% 100.0%
Ranking Quality NDCG@3 100.0% 100.0%
Latency Substitutions (p50 / p95) 6.67 ms 28.95 ms / 30.81 ms
Latency Flavor Pairing (p50 / p95) β€” 36.38 ms / 41.52 ms
Latency Pantry Flavor Bridge (p50 / p95) β€” 60.04 ms / 62.85 ms
Throughput Sustained QPS β€” 35.1 QPS (/substitute) Β· 26.6 QPS (/pair)

Standalone Usage

import sys
from huggingface_hub import snapshot_download

# Downloads the full repo (bundled bi-encoder, cross-encoder, chroma_db, and app)
local_dir = snapshot_download(repo_id="Srihari2020/FlavorVector", repo_type="model")
sys.path.insert(0, local_dir)

from app.engine import FlavorEngine

engine = FlavorEngine()

subs, _ = engine.search_substitutes(
    query="what can replace buttermilk and give the same tanginess in pancakes?",
    top_k=3,
)
for hit in subs:
    print(f"#{hit['rank']} ({hit['relevance_score']*100:.1f}%): {hit['substitute']}")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Srihari2020/FlavorVector

Finetuned
(513)
this model