starhopp3r/TinyChat
Viewer • Updated • 1M • 224 • 19
How to use i3-lab/i3-22m with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="i3-lab/i3-22m")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("i3-lab/i3-22m", dtype="auto")How to use i3-lab/i3-22m with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "i3-lab/i3-22m"
# 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-22m",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/i3-lab/i3-22m
How to use i3-lab/i3-22m with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "i3-lab/i3-22m" \
--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-22m",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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-22m" \
--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-22m",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use i3-lab/i3-22m with Docker Model Runner:
docker model run hf.co/i3-lab/i3-22m
The i3 Model is a memory-optimized language model designed for conversational understanding. This version uses streaming tokenization to minimize RAM usage during training.
To use the model check the user.py.
| Parameter | Value | Description |
|---|---|---|
| Model Type | i3Model | Custom, high-efficiency architecture (likely SSM-enhanced). |
| Hidden Dimension (d_{model}) | 512 | The size of the vector space for internal representations. |
| Number of Layers (n_{layers}) | 24 | The depth of the model's processing blocks. |
| Attention Heads (n_{heads}) | 16 | The number of parallel attention mechanisms (if applicable). |
| State Dimension (d_{state}) | 64 | Indicates the size of the recurrent state, common in SSMs. |
| Rank | 128 | Potentially used for low-rank projection in attention or state mechanisms. |
| Max Sequence Length | 256 | The maximum number of tokens/chunks the model can process at once. |
| Vocabulary Size | 4,466 | The total number of unique chunks/tokens in the vocabulary. |
| Metric | Range (Last 500 Iterations) | Observation |
|---|---|---|
| Loss | 1.98 - 2.27 | Training loss remained relatively stable, suggesting convergence towards the end of the run. |
| Perplexity (PPL) | 7.29 - 9.70 | Perplexity is a measure of how well the model predicts the next token. This range is typical for raw pre-training logs and indicates the model has learned basic sequence dependencies. |
| Time per Iteration | \sim 8.2 \text{s} - 12.7 \text{s} | Processing time per iteration shows a sustained and efficient training throughput. |