Text Classification
Transformers
Safetensors
English
lfm2
text-generation
calibration
typed-decisions
system-one
rlcd
decision-making
jev-compatible
Instructions to use goutam/LFM2.5-1.2B-RLCD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use goutam/LFM2.5-1.2B-RLCD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="goutam/LFM2.5-1.2B-RLCD")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("goutam/LFM2.5-1.2B-RLCD") model = AutoModelForCausalLM.from_pretrained("goutam/LFM2.5-1.2B-RLCD", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from goutam/LFM2.5-1.2B-RLCD: direct link, hf CLI and curl.
- Browser
- Download file 3.95 kB
-
https://huggingface.co/goutam/LFM2.5-1.2B-RLCD/resolve/main/README.md
- Command line
-
hf download hf://goutam/LFM2.5-1.2B-RLCD/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/goutam/LFM2.5-1.2B-RLCD/resolve/main/README.md
3.95 kB
| license: other | |
| license_name: lfm-open-license-v1.0 | |
| license_link: https://huggingface.co/LiquidAI/LFM2.5-1.2B-Base/blob/main/LICENSE | |
| base_model: LiquidAI/LFM2.5-1.2B-Base | |
| datasets: | |
| - goutam/rlcd-decision-atlas | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-classification | |
| tags: | |
| - calibration | |
| - typed-decisions | |
| - system-one | |
| - rlcd | |
| - decision-making | |
| - lfm2 | |
| - jev-compatible | |
| # LFM2.5-1.2B-RLCD (Certa) | |
| A **System-One calibrated decision model**: given a `state` and typed `questions`, it returns | |
| **typed answers with calibrated probabilities** in a single forward pass β no text generation, | |
| no parsing. Runs with the open-source [`certa`](https://github.com/Kurumella/certa) library | |
| (`pip install certa`); training recipe summarized below. | |
| - **Base:** `LiquidAI/LFM2.5-1.2B-Base` | |
| - **Task:** Choice (pick one of β€26 options), Score (ordered level), Noul (yes/no probability) | |
| - **In-distribution test:** 0.766 accuracy Β· 0.319 Brier Β· 0.043 ECE Β· 0.079 AURC | |
| - **Latency:** β 14 ms per multi-question decision (warm, L40S) | |
| - **API:** compatible with [TypeSafe.ai's Jev](https://docs.typesafe.ai/) `POST /v1/systemone` | |
| ## Usage | |
| ```bash | |
| pip install certa | |
| ``` | |
| ```python | |
| from certa.engine import ModelEngine | |
| from certa.client import choice, score, verify | |
| engine = ModelEngine("goutam/LFM2.5-1.2B-RLCD") | |
| resp = engine.decide( | |
| "I was double-charged and support has ignored me for three days.", | |
| { | |
| "team": choice("Route this ticket", {"billing": "charges", "technical": "bugs", "sales": "pricing"}), | |
| "anger": score("How angry is the customer?", ["calm", "annoyed", "furious"]), | |
| "urgent": verify("Does the message convey urgency?"), | |
| }, | |
| ) | |
| print(resp.answers["team"].choice, resp.answers["team"].confidence) # billing 0.79 | |
| print(resp.answers["anger"].score) # 1.44 (0β2) | |
| print(resp.answers["urgent"].noul) # 0.78 | |
| ``` | |
| To serve the Jev-compatible HTTP API: | |
| ```bash | |
| CERTA_CHECKPOINT=goutam/LFM2.5-1.2B-RLCD pip install 'certa[serve]' && python -m certa --port 8000 | |
| ``` | |
| ## Training | |
| 1. **Supervised warm start** on 12k labelled rows from | |
| [`goutam/rlcd-decision-atlas`](https://huggingface.co/datasets/goutam/rlcd-decision-atlas): | |
| focal (Ξ³=2) + multiclass Brier over the option-token logits. | |
| 2. **RLCD refinement** (Reinforcement Learning for Calibrated Decisions) on the remaining ~519k | |
| rows: **REINFORCE** in a single-step bandit setup (sample one option, one scalar reward), | |
| reward `r = correct β p(action)` (RPS partial-credit for ordinal questions), **RLOO | |
| (leave-one-out) baseline**, light KL to the supervised reference. | |
| ## Evaluation | |
| | Split | Accuracy | Brier β | ECE β | AURC β | | |
| |---|---|---|---|---| | |
| | Test (in-distribution) | 0.766 | 0.319 | 0.043 | 0.079 | | |
| | Validation | 0.772 | 0.333 | 0.054 | β | | |
| | Holdout (unseen sources) | 0.458 | 0.678 | 0.157 | 0.395 | | |
| Multiclass-sum Brier (range 0β2), top-label 15-bin ECE. **Selective prediction:** acting only | |
| when the top probability β₯ 0.9 covers β 39% of cases at β 2.9% error β a calibrated confidence | |
| gate for act-vs-escalate routing. | |
| ## Intended use & limitations | |
| **Use for:** fast calibrated routing, triage, classification, and grading over text where you | |
| need a probability you can threshold β and to abstain/escalate on low-confidence cases. | |
| **Limitations:** | |
| - **Out-of-distribution:** weak (~0.46 accuracy) on entirely unseen source types β broaden | |
| training coverage for new domains, and re-check calibration on yours. | |
| - **β€ 26 options** per Choice (single-letter decode); larger sets are rejected. | |
| - Trained on English-leaning text sources; non-text / non-English inputs are unsupported. | |
| ## License | |
| Weights are released under the **LFM Open License v1.0** (inherited from the base model). | |
| Accompanying code (`certa`, `certa-rlcd`) is Apache-2.0. Not affiliated with TypeSafe.ai. | |