How to use from
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 "i3-lab/i3-4096ctx-chat" \
    --host 0.0.0.0 \
    --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "i3-lab/i3-4096ctx-chat",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
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 "i3-lab/i3-4096ctx-chat" \
        --host 0.0.0.0 \
        --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "i3-lab/i3-4096ctx-chat",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

i3 Hybrid Chat Model

This is a chat-tuned version of the i3 hybrid architecture with latent context compression.

Model Details

  • Architecture: RWKV + Attention Hybrid with Latent Compression
  • Parameters: ~342.4M
  • Context Window: 4096 tokens (via compression)
  • Inference Window: 4096 tokens
  • Kernel Size: 512 tokens
  • Training Data: HuggingFaceH4/ultrachat_200k

Usage

import torch
from tokenizers import Tokenizer

# Load model
model = torch.load("pytorch_model.bin")
tokenizer = Tokenizer.from_file("tokenizer.json")

# Format conversation
conversation = "<BOS><|user|>\nHello!\n<|assistant|>\n"
tokens = torch.tensor([tokenizer.encode(conversation).ids])

# Generate
output = model.generate(tokens, max_new_tokens=100, temperature=0.8)
response = tokenizer.decode(output[0].tolist())

Capabilities

  • Multi-turn conversations
  • Long context understanding via latent compression
  • Efficient inference with RWKV base layers
  • Ready for chain-of-thought fine-tuning

Training

Fine-tuned on UltraChat 200k dataset with:

  • Learning rate: 1e-05
  • Batch size: 4 Γ— 4 accumulation
  • Sequence length: 512
Downloads last month
27
Safetensors
Model size
0.3B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using i3-lab/i3-4096ctx-chat 1