Instructions to use enzinol/Fred with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use enzinol/Fred with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Fred
A fine-tune of lev-350m: LiquidAI LFM2.5-350M plus a LoRA adapter and a pointer head, a System-1 decision model. It answers typed questions about a state (choice, score, noul) in one forward pass, behind a /v1/systemone HTTP API. It was trained on dataset labels only.
This is not a GGUF. llama.cpp cannot run lev-350m: its "prev pointer" routing of LFM2's short convolutions and its pointer head are not implemented. Note that ggml-org/lev-GGUF is a different model (InterfazeAI lev-4B). Run Fred with lev's own PyTorch server.
Files
| File | What it is |
|---|---|
adapter_model.safetensors, adapter_config.json |
LoRA r16 (alpha 32) on q/k/v/out, in_proj and w1/w2/w3 |
head.pt |
the 6.5M-parameter pointer head, a PyTorch pickle (load with weights_only=True) |
training_config.json, training_metrics.json |
lev training arguments and metrics |
tokenizer.json, tokenizer_config.json, chat_template.jinja |
LFM2.5 tokenizer files |
s1bench_run.json |
provenance: base revision, training-data hash, rows, epochs |
SHA256SUMS |
checksums of the adapter and the head |
Run
git clone https://github.com/franckverrot/lev && cd lev # tested at commit c48a945d
uv sync --extra serve
hf download enzinol/Fred --local-dir ./Fred
LEV_TEMPERATURE=1 uv run --extra serve python -m lev.serve --run ./Fred --port 8009
curl localhost:8009/v1/systemone -H 'content-type: application/json' -d '{"state": {...}, "questions": {...}}'
The base LiquidAI/LFM2.5-350M (revision 9e6c6ccf, 710 MB) downloads on first start.
Training
- Base:
LiquidAI/LFM2.5-350Mrevision9e6c6ccf. lev trains from the backbone, not from the released adapter. - Run:
lev.train, 2 epochs, LoRA r16, lr 2e-4,--perm_kl 0.1, Apple M-series GPU (MPS), about 80 min - Targets: one-hot dataset labels; no teacher model or distillation
- State length: each state was cut to lev's 400-token limit, the same way its server cuts input (97% of fake-job rows were cut)
- Data: 13,442 rows from four public datasets:
| Dataset | Task | License |
|---|---|---|
| EMSCAD fake job postings | is this posting fraudulent (noul) | CC0-1.0 |
PhishNChips core |
is this email phishing (noul) | other: "intended strictly for security research and defensive evaluation" (see its SOURCE_LICENSES.md) |
| Twitter financial news topics | topic, 20 classes (choice) | MIT |
| App reviews | star rating, 1 to 5 (score) | unknown |
Evaluation (held-out 20% of each dataset)
| Dataset | Metric | Fred | lev-350m untrained |
|---|---|---|---|
| Fake jobs (4.9% fraud, 3,510 rows) | PR-AUC | 0.728 | 0.079 |
| Fake jobs | fraud caught at 5% FPR | 0.801 | 0.023 |
| Fake jobs | AUROC | 0.947 | 0.615 |
| News topics (3,749 rows) | accuracy | 0.873 | 0.338 |
| App reviews (1,947 rows) | QWK | 0.737 | 0.699 |
| App reviews | MAE (lower is better) | 0.677 | 1.015 |
These scores are in-distribution: the test rows come from the same datasets as the training rows. Phishing is left out of the table because its classes are separable from surface artifacts, which makes trained scores there (1.000 AUROC) uninformative. Latency was about 90 ms per request on Apple Silicon (Metal), with requests sent one at a time.
Intended use and limits
- For: research and evaluation of small, fast decision models for fraud and content screening, and as a starting point for fine-tuning on your own labels.
- Not for: unsupervised automated decisions about people (hiring, credit, account closure) without human review and your own validation.
- Short reads: it reads only the first 400 tokens of a state, silently. Long documents and sessions lose everything after that.
- Fraud domain: the fraud signal comes from 2012–2014 job ads (EMSCAD) and a phishing benchmark. Expect drift on other domains and newer scams.
- Untested out of scope: behaviour on questions outside the four training tasks has not been measured.
Caveats
- Calibration: served probabilities use
LEV_TEMPERATURE=1. Fit a temperature on your own labelled rows before gating on confidence. - Licensing: the adapter derives from
LiquidAI/LFM2.5-350Mand inherits its LFM Open License v1.0 (check its terms, including commercial-use conditions); lev's code is Apache-2.0. Check the training datasets' licences above for your use case.
- Downloads last month
- -