Ryno-0.8B: A compact LLM with a 2M-token database memory
3 min readupdated
An experimental 805.6M parameter language model by FuryLogic Labs, built on Qwen3.5-0.8B. Its standout feature is the DBAttention mechanism: instead of keeping the KV cache (memory of previous context) in GPU VRAM, the model writes it directly to an external database and loads the required chunks on the fly during attention computation. This expands the context length from a native 262,144 to 2,000,000 tokens without hitting VRAM limits, and the knowledge base itself can be reused across different sessions. It is suited for researchers and developers who need to analyze long documents on modest hardware or test custom memory architectures.
Key features
- KV cache in database: out of 25 architectural blocks, only 6 require key and value storage (the remaining 18 are recurrent gated-DeltaNet blocks), meaning 2 million tokens take up about 17.7 GB on disk in int8 instead of hundreds of gigabytes.
- Low VRAM usage: peak usage in fp16 is 1.94 GB, and at a context of 8,192 tokens the model consumes 1.61 GB of video memory where a standard approach would crash with an OOM error.
- Two sampling modes: you can load the entire saved layer history for precise attention (
window=None) or pull only the latest N tokens for endless streaming chats (window=N). - Improved reasoning: post-training with the MuonClip optimizer raised the average score on an internal benchmark of 80 tasks from 26.2% for the frozen base to 78.8%.
What you can do
- Load a massive text document into a local database via the built-in
ingest(text)method in 512-token chunks and ask questions about it on a GPU with 2–8 GB of memory. - Run a local bot with an endless chat history, limiting the attention window via the
window=4096parameter to maintain stable resource consumption. - Use the repository and attached preprints to experiment with external KV state storage and cache reuse between requests.
Example
import torch
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("FuryLogic-Labs/Ryno-0.8B", trust_remote_code=True, torch_dtype=torch.float16)
tok = AutoTokenizer.from_pretrained("FuryLogic-Labs/Ryno-0.8B", trust_remote_code=True)
model.enable_db_attention(path=".ryno-db/serve.db", max_tokens=2_000_000, window=None)
print(model.chat("What is the capital of France?", max_new_tokens=64))
Read more
DetailsBenchmark (80 multiple-choice tasks): 92% in mathematics, physics, and chemistry, 100% in coding, 67% in natural sciences, but a drop on banking77 (50% vs 80% for the base).
Hardware: checkpoint weight is 1.37 GB (fp16), peak VRAM is 1.94 GB; at 4,096 tokens prefill reaches 3,057–3,471 tok/s on an 8 GB GPU.
Limitations: weak open chat (trained on multiple-choice tasks), single-token generation latency with the database has not been measured yet, vision does not work, and SublayerNets bridges are inactive in these weights.










Comments