Upload folder using huggingface_hub
Browse files24 unmodified lines25262728293031323334353637383920 unmodified lines60616263646566133 unmodified lines20020120220320420520620720820921021121221321421521621721821924 unmodified lines- **1.2 MB.** 712 gradient-boosted trees, not a neural network.- **Milliseconds on one CPU core.** No GPU, no network call, no extra model request.- **Deterministic.** The same context and query give the same bytes on every machine.- **Verbatim.** Every kept line is a line of the input.It saves the most on long-document retrieval, where it removes most of theinput and keeps the evidence. On short coding-agent tool outputs it saveslittle by design. See [Which setting to use](#which-setting-to-use).trim-1 is the model inside [Caveman](https://github.com/JuliusBrussee/caveman)Engine, where the package is named `keep`.## How it works20 unmodified lines| `aggressive` | 0.035 | cut most |trim-1 fails closed. It returns the context unchanged when the query is blank,the context is under 2,000 characters, the context is over 8 MiB or 200,000lines, or the cut would remove less than 10% of the bytes.## Results133 unmodified lines## Usetrim-1 runs inside Caveman Engine. The feature code and the model are one Gopackage with no cgo, so it also builds for WebAssembly.```goimport "github.com/JuliusBrussee/caveman/engine/keep"res := keep.Compress(context, query, keep.Options{Point: "balanced"})fmt.Println(res.Output)```From the command line:```bashcaveman-engine compress --query "why does the build fail" < build.log```## License24 unmodified lines25262728293031323334353637383920 unmodified lines60616263646566133 unmodified lines20020120220320420520620720820921021121221321421521621721821922024 unmodified lines- **1.2 MB.** 712 gradient-boosted trees, not a neural network.- **Milliseconds on one CPU core.** No GPU, no network call, no extra model request.- **Deterministic.** No sampling and no randomness: the same context and query give the same output.- **Verbatim.** Every kept line is a line of the input.It saves the most on long-document retrieval, where it removes most of theinput and keeps the evidence. On short coding-agent tool outputs it saveslittle by design. See [Which setting to use](#which-setting-to-use).trim-1 is the model inside [Caveman](https://github.com/JuliusBrussee/caveman).The code is at [caveman-ai/trim-1](https://github.com/caveman-ai/trim-1).## How it works20 unmodified lines| `aggressive` | 0.035 | cut most |trim-1 fails closed. It returns the context unchanged when the query is blank,the context is under 2,000 bytes, the context is over 8 MiB or 200,000lines, or the cut would remove less than 10% of the bytes.## Results133 unmodified lines## UseThe code is on GitHub: [caveman-ai/trim-1](https://github.com/caveman-ai/trim-1).It is pure Go with no dependencies, and the model is embedded.```bashgo install github.com/caveman-ai/trim-1/cmd/trim@latesttrim --query "why does the build fail" build.log```From Go:```goimport trim "github.com/caveman-ai/trim-1"res := trim.Compress(context, query, trim.Options{Point: "balanced"})fmt.Print(res.Output)```## License
README.md+15-14