How adobe-research/nolima works
Project type and purpose
• Type: Benchmark/evaluation framework for large language models (LLMs).
File structure
Top‐level directories:
– data/ → data ingestion & preprocessing (haystacks, needle sets, filtering scripts, notebooks)
– evaluation/ → evaluation runner, model‐serving scripts, async API connector, config templates, result gathering
Other files:
– requirements.txt
– run‐and‐helper scripts (shell files for downloading data, starting model servers, running tests)
– notebooks for data cleaning (data/*.ipynb) and analysis (evaluation/gather_results.ipynb)
Key insights from README
– Describes the NoLiMa benchmark and pipeline steps: install, download data, start local server or configure API, prepare run configs, execute tests, collect & aggregate results.
– Mentions use of vLLM, asyncio, YAML configs, HuggingFace datasets, and API providers (Fireworks, OpenRouter).
Main components
A. Data Preparation Layer
• Raw Data (Haystack & Needle sets) in data/
• Preprocessing scripts & notebooks (data/clean_books.ipynb, remove_distractors.ipynb, download scripts)
• Output: formatted haystacks and needles in data/needlesets & data/haystack/rand_shuffle
B. Evaluation Layer
• Runner scripts (evaluation/run_tests.py, run_tests.sh)
• Async API connector (evaluation/async_api_connector.py)
• Model server startup (evaluation/vllm_serve.sh)
C. Configuration Layer
• Model configs (evaluation/model_configs/*.json)
• Run configs (evaluation/run_config/*.yaml)
D. Model Serving
– Local “vLLM” server (on‐prem GPU cluster)
– External API providers (OpenAI, Fireworks, OpenRouter)
E. Results & Analysis
• Raw outputs (per‐test JSON or CSV files)
• Aggregation notebook (evaluation/gather_results.ipynb)
• Final result tables & visualizations
Relationships & data flows
1) Data Preparation → generates haystacks & needles →
2) Runner (run_tests.sh / run_tests.py) reads run_config YAML →
3) Runner loads model_config JSON →
4) If local: launch vLLM serve script; if API: async_api_connector handles calls →
5) For each test: supply haystack+needle to LLM → collect predictions →
6) Store raw results in output directory →
7) Analysis notebook ingests outputs → produces consolidated CSV & plots
Architectural patterns & principles
– Modularity: clear separation between data prep, evaluation execution, configuration, and results analysis
– Extensibility: add new model_config files and run_config templates without code changes
– Asynchronous I/O: evaluation/async_api_connector.py uses asyncio to parallelize API calls
– Infrastructure‐agnostic: supports local GPU servers and external APIs via pluggable connectors
Technologies & frameworks
– Python 3.x, asyncio
– Shell scripts (bash) for orchestration
– Jupyter Notebooks for prototyping & analysis
– vLLM (local inference server)
– YAML (run configurations) & JSON (model configurations)
– HuggingFace Datasets for data storage & retrieval