This repository contains a set of three pipelines to run and compare multiple LLM outputs on a shared question set. It consists of three execution styles:
transformers generation (model.generate) over prompts.code/
main.py
model_id_list*.json
pipelines/
bare/ # transformers-only evaluation
lmql/ # LMQL server and worker orchestration
rag/ # ChromaDB, embeddings, generator model
utils/
Key files:
code/main.py: entrypoint, selects a pipeline (bare, lmql, rag).code/model_id_list*.json: curated lists of models grouped by organisationcode/pipelines/*/*_config.json: pipeline configuration (paths, batch sizes, timeouts, etc.).code/pipelines/*/*.job: cexample SLURM submission scripts (cluster usage).Bare
torchtransformersaccelerate (recommended)bitsandbytes (only if you run bnb-4bit models)LMQL
lmqlRAG
chromadbsentence-transformerslangchain (text splitter)unsloth (used by the current RAG runner)The minimum expected structure is:
data/
in/
tasks/
test_task_0.json
generate_task.json # or other task_*.json files
data_ground_truth/
... # RAG documents (folder of .txt/.md/.json)
out/
bare/
lmql/
rag/
chroma_db/ # persistent vector DB (RAG)
Bare and RAG expect a JSON list of objects containing a prompt field, e.g.:
[
{"prompt": "What is the capital of France?"},
{"prompt": "Explain cochlear implants in simple terms."}
]
Model lists live in code/model_id_list*.json and are grouped by organisation, for example:
{
"Google": [
{"model_id": "unsloth/gemma-2b-bnb-4bit", "type": "causal", "...": "..."}
],
"Meta": [
{"model_id": "unsloth/llama-2-7b-bnb-4bit", "type": "causal", "...": "..."}
]
}
The pipelines typically rely on:
model_id — Hugging Face model identifiertype — "causal" or "seq2seq"bare_run1.py)Outputs:
paths.OUTPUT_DIR (timestamped filenames)paths.OUTPUT_DIR/checkpoints/data/out/bare/logs/bare_pipeline.logResult format:
{
"model_id": "…",
"timestamp_utc": "YYYYMMDD_HHMMSS",
"results": [{"question": "...", "answer": "..."}]
}
paths.OUTPUT_DIR.Out-of-memory (GPU): lower BATCH_SIZE and/or MAX_LENGTH in the pipeline config.
4-bit models fail on CPU: bnb-4bit models require CUDA + bitsandbytes.
Disk pressure from model downloads: some runners delete per-model cache directories after runs, confirm HF cache location and available quota.
Gated models: export HF_TOKEN / HUGGINGFACE_HUB_TOKEN or run huggingface-cli login.
Use code/utils/add_tokenizer.py to add/check tokenizer fields in the model list.
Use code/utils/filter_missing_models.py to produce filtered model lists by substring matching.
Model licenses vary by model and are listed (when available) in the model list JSON files. Ensure you comply with the relevant model terms.
2 commits
Python
98.8%
Shell
1.2%
This repository contains a set of three pipelines to run and compare multiple LLM outputs on a shared question set. It consists of three execution styles:
transformers generation (model.generate) over prompts.code/
main.py
model_id_list*.json
pipelines/
bare/ # transformers-only evaluation
lmql/ # LMQL server and worker orchestration
rag/ # ChromaDB, embeddings, generator model
utils/
Key files:
code/main.py: entrypoint, selects a pipeline (bare, lmql, rag).code/model_id_list*.json: curated lists of models grouped by organisationcode/pipelines/*/*_config.json: pipeline configuration (paths, batch sizes, timeouts, etc.).code/pipelines/*/*.job: cexample SLURM submission scripts (cluster usage).Bare
torchtransformersaccelerate (recommended)bitsandbytes (only if you run bnb-4bit models)LMQL
lmqlRAG
chromadbsentence-transformerslangchain (text splitter)unsloth (used by the current RAG runner)The minimum expected structure is:
data/
in/
tasks/
test_task_0.json
generate_task.json # or other task_*.json files
data_ground_truth/
... # RAG documents (folder of .txt/.md/.json)
out/
bare/
lmql/
rag/
chroma_db/ # persistent vector DB (RAG)
Bare and RAG expect a JSON list of objects containing a prompt field, e.g.:
[
{"prompt": "What is the capital of France?"},
{"prompt": "Explain cochlear implants in simple terms."}
]
Model lists live in code/model_id_list*.json and are grouped by organisation, for example:
{
"Google": [
{"model_id": "unsloth/gemma-2b-bnb-4bit", "type": "causal", "...": "..."}
],
"Meta": [
{"model_id": "unsloth/llama-2-7b-bnb-4bit", "type": "causal", "...": "..."}
]
}
The pipelines typically rely on:
model_id — Hugging Face model identifiertype — "causal" or "seq2seq"bare_run1.py)Outputs:
paths.OUTPUT_DIR (timestamped filenames)paths.OUTPUT_DIR/checkpoints/data/out/bare/logs/bare_pipeline.logResult format:
{
"model_id": "…",
"timestamp_utc": "YYYYMMDD_HHMMSS",
"results": [{"question": "...", "answer": "..."}]
}
paths.OUTPUT_DIR.Out-of-memory (GPU): lower BATCH_SIZE and/or MAX_LENGTH in the pipeline config.
4-bit models fail on CPU: bnb-4bit models require CUDA + bitsandbytes.
Disk pressure from model downloads: some runners delete per-model cache directories after runs, confirm HF cache location and available quota.
Gated models: export HF_TOKEN / HUGGINGFACE_HUB_TOKEN or run huggingface-cli login.
Use code/utils/add_tokenizer.py to add/check tokenizer fields in the model list.
Use code/utils/filter_missing_models.py to produce filtered model lists by substring matching.
Model licenses vary by model and are listed (when available) in the model list JSON files. Ensure you comply with the relevant model terms.
2 commits
Python
98.8%
Shell
1.2%