| --- |
| license: mit |
| tags: |
| - quantization |
| - codebook |
| - sf |
| - ridge |
| --- |
| # SF map — shared Ridge selector |
|
|
| Cross-model sensitivity estimator for the shared 27-option SF catalog in [`dlab-cmu/sf-grids`](https://huggingface.co/dlab-cmu/sf-grids). |
|
|
| Per-model maps (`dlab-cmu/sf-map-{org}__{name}`) are preferred when they exist. This repo is the fallback: one Ridge over type + size/arch features, plus an MoE type residual. |
|
|
| `sf-map-ridge.json` is just numbers. Overwrite it to publish a better estimator. |
|
|
| ```python |
| from huggingface_hub import hf_hub_download |
| import json |
| path = hf_hub_download("dlab-cmu/sf-map-ridge", "sf-map-ridge.json") |
| ridge = json.load(open(path)) |
| score = ridge["intercept"] |
| for x, mu, sd, w in zip(xs, ridge["feature_mean"], ridge["feature_std"], ridge["weights"]): |
| score += (x - mu) / sd * w |
| if has_moe: |
| score += ridge["moe_residual"]["type_means"].get(layer_type, 0.0) |
| ``` |
|
|
| Target is `log(mean direct codebook KL)`. `has_moe` / DeltaNet are architectural flags, not family names. |
|
|