Download encoder/src/model/heads/__init__.py from cdotsanghvi/lfm2-transaction-encoder: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/spaces/cdotsanghvi/lfm2-transaction-encoder/resolve/main/encoder/src/model/heads/__init__.py
- Command line
-
hf download hf://spaces/cdotsanghvi/lfm2-transaction-encoder/encoder/src/model/heads/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/cdotsanghvi/lfm2-transaction-encoder/resolve/main/encoder/src/model/heads/__init__.py
1.03 kB
| """Per-surface heads for the multi-surface encoder demo. | |
| Each surface (dispute legitimacy, collections, fraud pattern, AML | |
| anomaly, credit repayment) gets one probability head + one attribution | |
| head + reuses the LM head for reasoning generation. Heads share the | |
| backbone via per-surface LoRA adapters. | |
| Doctrine sources: | |
| - `liquid-models-architecture` Section 10 (head selection table). | |
| - `liquid-finetuning-playbook` Section 10 (350M attractor states: | |
| prefer categorical over continuous numerics). | |
| - `liquid-models-architecture` Section 16 (mean-pool, not last-token, | |
| on LFM2.5 because the final layer is conv). | |
| - Multi-head decision layer ADR-014: per-task LoRA + per-batch | |
| homogeneous-head sampling. Co-training token + sequence heads | |
| naively collapsed PII to 9.9% F1. | |
| """ | |
| from __future__ import annotations | |
| from encoder.src.model.heads.attribution_head import AttributionHead | |
| from encoder.src.model.heads.probability_head import ProbabilityHead | |
| __all__ = ["ProbabilityHead", "AttributionHead"] | |