mosaic-bench
Run the MOSAIC benchmark — nine validated psychometric questionnaires and four ethical dilemmas — against any LLM. Test data is pulled directly from the MOSAIC repository at a pinned commit and cached locally, so there is nothing to download by hand.
Install
pip install "mosaic-bench[openai]" # OpenAI, Groq, DeepSeek, vLLM, Ollama, ...
pip install "mosaic-bench[hf]" # HF Inference Providers
pip install "mosaic-bench[local]" # offline, via transformers
Run
export OPENAI_API_KEY=sk-...
mosaic --model gpt-4o --test mfq2 sdo --runs 10
Or pass the key inline:
mosaic --model gpt-4o --api-key sk-... --test mfq2
Any OpenAI-compatible endpoint works without code changes:
mosaic --backend openai --model qwen/qwen3-32b \
--base-url https://api.groq.com/openai/v1 --api-key gsk_...
mosaic --backend openai --model my-finetune \
--base-url http://localhost:8000/v1 --api-key dummy # local vLLM
Anything on the Hub:
export HF_TOKEN=hf_...
mosaic --backend hf --model meta-llama/Llama-3.3-70B-Instruct --test mfq2
Fully offline, no keys:
mosaic --backend local --model Qwen/Qwen3-8B --test mfq2 --runs 3
Output
mfq2 — gpt-4o
authority 21.00 ± 1.00
care 24.33 ± 2.08
equality 19.67 ± 5.13
! 2.1% of answers imputed — {'ok': 340, 'unparsable': 8}
Two files per test under results/<model>/:
<test>_<variant>.jsonl— one record per invocation: raw response, run index, temperature, timestamp, provider status.<test>_<variant>_scored.jsonl— the same records plusparsed_score,parse_statusandimputed.
Runs are resumable: re-running the same command skips (item, run) pairs already
on disk, and raising --runs only fills in the missing repetitions.
Python API
from mosaic_bench import build_backend, run_test
backend = build_backend("gpt-4o", api_key="sk-...")
summary = run_test(backend, "mfq2", runs=10)
print(summary["scores"], summary["quality"])
Notes on scoring
- Answers are parsed leniently but validated against each test's declared range; out-of-range values are rejected rather than accepted.
- Unparsable answers are imputed with the test's neutral score, and the imputed fraction is reported alongside every result.
- Provider content filters are recorded as
content_filteredand excluded from aggregation — never converted into a score. - Reverse-keyed items are flipped using
scale_min + scale_max.
Publishing
Until this is on PyPI, it installs straight from the repository:
pip install "git+https://github.com/EricaCoppolillo/MOSAIC#egg=mosaic-bench[openai]"
To publish to PyPI, from the package root:
python -m build
python -m twine upload dist/*
Prefer PyPI Trusted Publishing over an API token: it authenticates the GitHub Actions workflow via OIDC, so no long-lived secret lives in the repo. Configure the publisher once at pypi.org/manage/account/publishing/, then tag a release.
Metadata
Release files for mosaic-llm-bench 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mosaic_llm_bench-0.1.0.tar.gz | 14.3 kB | Without provenance | Details for mosaic_llm_bench-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mosaic_llm_bench-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mosaic_llm_bench-0.1.0-py3-none-any.whl |
Total release size: 29.5 kB
Release files / mosaic_llm_bench-0.1.0.tar.gz
| Download URL | mosaic_llm_bench-0.1.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef2f15045bf257c458219afef46f14adb57d791a7f18f64bcb63aae61822d4d6
|
|
BLAKE2b-256 checksum How to use checksums |
94f186e8b617ecf188d6a34e8a59d5fdd414f5acfe43a3a7d871aaca272e6f6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.1
|
Release files / mosaic_llm_bench-0.1.0-py3-none-any.whl
| Download URL | mosaic_llm_bench-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4469da66a2ba37522ddd5edf9bdf9eb543a69f676b3cd8f3d52ee249122760f3
|
|
BLAKE2b-256 checksum How to use checksums |
b9eedf70a05afaafddc138899bc2ae2f01f809c681c7861291ae02093c46918d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.1
|
Security for mosaic-llm-bench 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.