Instructions to use i3-lab/i3-4096ctx-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use i3-lab/i3-4096ctx-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="i3-lab/i3-4096ctx-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("i3-lab/i3-4096ctx-chat", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use i3-lab/i3-4096ctx-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "i3-lab/i3-4096ctx-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/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
docker model run hf.co/i3-lab/i3-4096ctx-chat
- SGLang
How to use i3-lab/i3-4096ctx-chat 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 "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?" } ] }' - Docker Model Runner
How to use i3-lab/i3-4096ctx-chat with Docker Model Runner:
docker model run hf.co/i3-lab/i3-4096ctx-chat
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
- 404