mirror of
https://github.com/wassname/moral-maps.git
synced 2026-09-07 17:00:37 +08:00
read_api.read_items_sampled samples N chat completions at temperature and uses the empirical answer frequency as the per-item categorical p, emitting the same row shape the logprob reader does -- so E/profile/entropy flow through the identical per_item_categorical + reducers and a frontier model without logprobs drops onto the same map. pmass_allowed becomes the parse rate (sampling coherence gate); C/LO are omitted by design (log of a frequency has -inf zeros). This is the Economist's 'average of ten responses' method. UAT (docs/reviews/p3_api_sampling_uat.md): E_mc == E_logprob to <=0.01 (unbiased), llama-3.1-8b sampled E lands on the same [1,5] scale, parse-rate gate flags off-format draws. Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
41 lines
1.0 KiB
TOML
41 lines
1.0 KiB
TOML
[project]
|
|
name = "tiny-mfv"
|
|
version = "0.1.0"
|
|
description = "Tiny moral-foundations vignettes eval (Clifford 2015 classic + paraphrase configs) for steering checkpoints."
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"transformers>=5.7",
|
|
"torch",
|
|
"pandas",
|
|
"loguru",
|
|
"tqdm",
|
|
"tabulate",
|
|
"numpy",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# tinymfv.maps (culture-map + range viz) only; `import tinymfv` and the evals stay headless,
|
|
# numeric-only consumers (steering-lite) skip this. Install with `pip install tiny-mfv[maps]`.
|
|
maps = [
|
|
"matplotlib>=3.8",
|
|
"textalloc>=1.2.3", # non-overlapping label placement on the maps
|
|
]
|
|
# tinymfv.read_api (sampling readout for logprob-less API models) only. Install with
|
|
# `pip install tiny-mfv[api]`. The local logprob reader (read.py) needs none of this.
|
|
api = [
|
|
"openai>=1.0",
|
|
"python-dotenv",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"scipy>=1.17.1",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/tinymfv"]
|