How baileyclark33/allen-hackathon works
Nemroute is a tiered Nemotron router and research pipeline: the demo accepts a question, routes it to a tier, obtains an answer, and reports cost and latency. Separate workflows generate and label datasets, tune routing thresholds, freeze evaluation splits, and compare routing strategies. The graph includes the documented optional reference-model capability. Some links rely on the README or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: client.py Model client · streamlit_app.py Streamlit demo · answer.py Tier answering · generate.py Query generation
Components 24
Question routing
- Streamlit demo
app/streamlit_app.py - Spend guard
src/nemoroute/app_guard.py - Router registry
src/nemoroute/routers/registry.py - Zero-shot router
src/nemoroute/routers/zero_shot.py
Model inference
- Tier answering
src/nemoroute/labeling/answer.py - Model client
src/nemoroute/client.py
Dataset research
- Query generation
src/nemoroute/dataset/generate.py - Query deduplication
src/nemoroute/dataset/dedup.py - Labeling pipeline
src/nemoroute/labeling/pipeline.py - Answer judge
src/nemoroute/labeling/judge.py - Tier labels
src/nemoroute/labeling/label.py - Threshold tuning
src/nemoroute/labeling/tuning.py - Dataset splitting
src/nemoroute/split.py - Evaluation runner
src/nemoroute/evaluation/run.py - Evaluation metrics
src/nemoroute/evaluation/system.py - Reference comparison
src/nemoroute/reference.py
Cost and records
- Configuration
src/nemoroute/config.py - Pricing estimates
src/nemoroute/pricing.py - Run budget
src/nemoroute/budget.py - Usage log
src/nemoroute/usage_log.py - JSONL records
src/nemoroute/jsonl.py
Other components
- Question asker
- Token Factory API
- Anthropic API
Connections 28
- Question asker → Streamlit demo: asks
README.md - Streamlit demo → Spend guard: checks spend
app/streamlit_app.py - Streamlit demo → Router registry: builds router
app/streamlit_app.py - Router registry → Zero-shot router: selects
src/nemoroute/routers/registry.py - Zero-shot router → Model client: classifies with
src/nemoroute/routers/registry.py - Streamlit demo → Tier answering: requests answer
README.md - Tier answering → Model client: calls model
src/nemoroute/labeling/answer.py - Model client → Token Factory API: sends inference
README.md - Model client → Anthropic API: supports provider
src/nemoroute/client.py - Query generation → Query deduplication: deduplicates
src/nemoroute/dataset/generate.py - Labeling pipeline → Tier answering: gets tier answers
src/nemoroute/labeling/pipeline.py - Labeling pipeline → Answer judge: grades answers
src/nemoroute/labeling/pipeline.py - Labeling pipeline → Tier labels: computes labels
- Answer judge → Model client: calls judge model
src/nemoroute/labeling/judge.py - Threshold tuning → Tier labels: uses label rules
src/nemoroute/labeling/tuning.py - Evaluation runner → Evaluation metrics: computes outcomes
src/nemoroute/evaluation/run.py - Evaluation runner → Zero-shot router: routes queries
src/nemoroute/evaluation/run.py - Reference comparison → Tier answering: generates answers
src/nemoroute/reference.py - Reference comparison → Answer judge: grades answers
src/nemoroute/reference.py - Model client → Pricing estimates: calculates call cost
src/nemoroute/client.py - Model client → Run budget: adds spend
src/nemoroute/client.py - Model client → Usage log: records calls
src/nemoroute/client.py - Usage log → JSONL records: reads and appends
src/nemoroute/usage_log.py - Query generation → Model client: generates with model
src/nemoroute/dataset/generate.py - Query generation → JSONL records: persists queries
src/nemoroute/dataset/generate.py - Evaluation runner → JSONL records: loads and saves
src/nemoroute/evaluation/run.py - Configuration → Model client: configures models
src/nemoroute/client.py - Configuration → Pricing estimates: provides prices
src/nemoroute/pricing.py