Text Generation
Transformers
Safetensors
gated_deltanet
causal-lm
linear-attention
gated-deltanet
hola
long-context
Instructions to use Wanyun/hola-recency-340m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Wanyun/hola-recency-340m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Wanyun/hola-recency-340m")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Wanyun/hola-recency-340m", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Wanyun/hola-recency-340m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Wanyun/hola-recency-340m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wanyun/hola-recency-340m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Wanyun/hola-recency-340m
- SGLang
How to use Wanyun/hola-recency-340m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Wanyun/hola-recency-340m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wanyun/hola-recency-340m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Wanyun/hola-recency-340m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wanyun/hola-recency-340m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Wanyun/hola-recency-340m with Docker Model Runner:
docker model run hf.co/Wanyun/hola-recency-340m
HOLA+recency 340M
This is the matched recency-control checkpoint used in the paper. For generation-style evaluations, set FLA_FORCE_NO_CACHE=1 to force full recomputation.
Model details
- Architecture: Gated DeltaNet with HOLA bounded exact cache
- Scale: 340M parameters
- Training data: SlimPajama-15B
- Tokenizer: Mistral-7B-v0.1 tokenizer, vocab size 32000
- Training context: 2048 tokens
- Cache:
w=64,chunk=256, RMSNorm-gamma cache read - Eviction:
recency(Matched HOLA cache with recency eviction)
Usage
Install the HOLA code package first, then load with Hugging Face Auto classes:
import torch
import fla # registers gated_deltanet
from transformers import AutoModelForCausalLM, AutoTokenizer
path = "YOUR_ORG/hola-recency-340m"
tok = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
path, torch_dtype=torch.bfloat16, device_map={"": "cuda"}
).eval()
prompt = "The capital of France is"
ids = tok(prompt, return_tensors="pt").input_ids.to("cuda")
out = model.generate(ids, max_new_tokens=32, do_sample=False)
print(tok.decode(out[0], skip_special_tokens=True))
For the recency-control model, generation-style evaluations should set:
export FLA_FORCE_NO_CACHE=1
Paper evaluation snapshot
| Metric | Value |
|---|---|
| Wikitext-103 PPL | 25.04 |
| LAMBADA PPL | 32.33 |
| Six-task commonsense average | 43.17 |
| FDA retrieval | 16.9 |
| SWDE retrieval | 29.9 |
| RULER S-NIAH-1 at 32k | 0.24 |
Citation
@article{hola2026,
title = {HOLA: Hybrid Optimization with a Learned Attention Cache},
author = {TODO},
journal = {arXiv preprint},
year = {2026}
}
- Downloads last month
- 135