File size: 1,878 Bytes
4666b42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---

license: other
license_name: lfm1.0
base_model: LiquidAI/LFM2.5-350M
tags:
- lfm2
- distillation
- bash
- shellai
- transformers
---


# LFM2.5-350M-ShellAI

ShellAI Bash-command model distilled at the response level from
`LiquidAI/LFM2.5-2.6B` into `LiquidAI/LFM2.5-350M`.

This repository contains the merged BF16 training checkpoint.

The model is trained to emit exactly one command inside:

```text

<shellai-command>command</shellai-command>

```

General chat anchors, assistant-only loss, LoRA, one training epoch, early stopping,
and a pre-publication retention gate are used to reduce catastrophic forgetting.
No generated command was executed during dataset construction or evaluation.

## Distillation

The two models have different vocabularies (128K teacher versus 65,536 student),
so this uses sequence-level response distillation rather than token-logit KL.
Teacher candidates that fail the command envelope, primary-utility, or reference-
similarity gates fall back to the verified dataset reference.

## Evaluation

Held-out repository test split (300 examples, BF16 Transformers):

| Model | Exact | Utility match | Token F1 | Valid envelope |
|---|---:|---:|---:|---:|
| Base 350M | 5.7% | 23.0% | 0.225 | 100.0% |
| Distilled 350M | 4.0% | 39.7% | 0.305 | 100.0% |

Chat retention used 50 non-shell prompts: shell-envelope leakage remained 0.0%; anchor similarity retained 84.9% of baseline.

Q8_0 llama.cpp CPU test (same 50-example subset):



| Threads | Token F1 | Utility match | Median latency | Decode |

|---:|---:|---:|---:|---:|

| 1 | 0.268 | 36.0% | 1278 ms | 16.6 tok/s |

| 2 | 0.268 | 36.0% | 641 ms | 32.5 tok/s |



## License



This is a modified derivative of Liquid AI's LFM2.5 weights and is distributed

under the included LFM Open License v1.0. See `NOTICE` for modification details.