BI-1s / README.md
sidhrth's picture
Upload BI-1s docs, license, adapter, and verified evaluation reports
59790c5 verified
|
Raw History Blame Contribute Delete
4.2 kB
---
license: other
license_name: lfm-open-license-v1.0
license_link: LICENSE
base_model: LiquidAI/LFM2.5-VL-1.6B
base_model_relation: finetune
pipeline_tag: image-text-to-text
tags:
- vision
- vlm
- multimodal
- gguf
- litert
- litert-lm
- litertlm
- lfm2
- on-device
- mobile
- bi-1s
- better-intelligence
---
# BI-1s (Better Intelligence 1 Small)
**BI-1s** is a compact, offline-first **vision + text** AI assistant developed by **Have an Idea** for the **Better Intelligence** platform. Built over [`LiquidAI/LFM2.5-VL-1.6B`](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B) (revision `919fde3d022e3f90a4716006f993938ee8c2eb97`), **BI-1s** is engineered and verified to run both **GGUF** (`llama.cpp` + multimodal `mmproj`) and **LiteRT-LM** (`.litertlm` with **Fix B** full-frame vision unshuffle) cleanly within **2 GB RAM (`<= 2,048 MiB` Peak RSS)**.
## Model Files
| Artifact | Format | Role | Size | SHA-256 |
|---|---|---|---:|---|
| `BI-1s-Q4_K_M.gguf` | GGUF (`Q4_K_M`, imatrix) | Text + reasoning decoder | 730,895,808 B (697.0 MiB) | `879284490435ea6fc4e514bd1b9ab579d15485858c204d499200f42214482df9` |
| `mmproj-BI-1s-Q8_0.gguf` | GGUF (`Q8_0`) | SigLIP2 multimodal vision projector | 583,109,376 B (556.1 MiB) | `5ede3d1c59ba3bf0fcec654206b9171b9dafe202d28cbce9ec0ca1b6d4dd4c44` |
| `BI-1s-int4.litertlm` | LiteRT-LM (`INT4` + vision) | Single-file mobile/edge text+vision package (Fix B) | 1,103,462,400 B (1052.3 MiB) | `e27973f241b3e666a89256e152c492ccd5f877a7a654c193ad89907ed17c4477` |
| `adapter/` | PEFT LoRA (`bf16`) | Fine-tuned language/multimodal adapter | — | — |
Combined GGUF download (`BI-1s-Q4_K_M.gguf` + `mmproj-BI-1s-Q8_0.gguf`): **1,314,005,184 B (1253.1 MiB)**.
## Verified Capabilities & Memory (`<= 2,048 MiB` Peak RSS)
All measurements recorded on `2048`-token context (`-c 2048` / `--max-num-tokens 2048`) with `/usr/bin/time -v` Peak RSS (`VmHWM`) in CPU execution (LiteRT-LM with standard `--cache disk` weight caching):
| Runtime Format | Text Checks | Vision Checks | Measured Peak RSS (`VmHWM`) | Within 2 GB RAM |
|---|---:|---:|---:|---|
| **GGUF (`llama.cpp` + `mmproj`)** | 4/4 | 5/5 | **1213.43 MiB** | Yes (`<= 2,048 MiB`) |
| **LiteRT-LM (`BI-1s-int4.litertlm`)** | 4/4 | 5/5 | **1623.45 MiB** | Yes (`<= 2,048 MiB`) |
Vision verification includes dominant color, centered OCR, geometric shape identification, object counting, and **bottom-quarter OCR** (`"BOTTOM 42"`) confirming full-frame visual coverage (including **Fix B** moving `2x2` `pixel_unshuffle` inside the LiteRT vision encoder so no top-quarter crop occurs).
## Training Summary
- **Foundation:** `LiquidAI/LFM2.5-VL-1.6B` @ `919fde3d022e3f90a4716006f993938ee8c2eb97` (1.2B LFM2.5 hybrid short-conv/GQA backbone + SigLIP2 vision tower)
- **Stage 1 (Text SFT):** 8,100 curated BID v1.0 + identity rows (BF16 compute / 4-bit NF4 QLoRA, `<think>` stripped, `vision_tower` frozen, 507 steps, `eval_loss=0.5948`, `eval_mean_token_accuracy=0.8413`)
- **Stage 2 (Multimodal Vision+Text SFT):** 1,500 vision-text records (`vision_tower` frozen cleanly in native `bfloat16`, `train_loss=0.5377`, `eval_loss=0.3454`)
- **Stage 3 (Identity & Grounding Polish):** 320 mixed identity + anchor rows ensuring clean assistant identity with or without system prompts (`train_loss=0.6639`)
## Usage
### 1. GGUF (`llama.cpp` / `llama-mtmd-cli`)
```bash
# Vision + text
llama-mtmd-cli -m BI-1s-Q4_K_M.gguf --mmproj mmproj-BI-1s-Q8_0.gguf -c 2048 --temp 0 --image photo.png -p "Describe this image."
# Text only
llama-completion -m BI-1s-Q4_K_M.gguf -c 2048 -p "<|startoftext|><|im_start|>user
Who are you?<|im_end|>
<|im_start|>assistant
"
```
### 2. LiteRT-LM (`litert-lm` >= `0.20.0`)
```bash
pip install litert-lm==0.20.0
# Vision + text
litert-lm run BI-1s-int4.litertlm --max-num-tokens 2048 --attachment photo.png --prompt "What does this image show?"
# Text only
litert-lm run BI-1s-int4.litertlm --max-num-tokens 2048 --prompt "Who are you?"
```
## License
Distributed under **LFM Open License v1.0** (`LICENSE`), inherited from `LiquidAI/LFM2.5-VL-1.6B`.