Instructions to use sagepond/U-AT1-TINY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sagepond/U-AT1-TINY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sagepond/U-AT1-TINY", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("sagepond/U-AT1-TINY", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sagepond/U-AT1-TINY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sagepond/U-AT1-TINY" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sagepond/U-AT1-TINY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sagepond/U-AT1-TINY
- SGLang
How to use sagepond/U-AT1-TINY 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 "sagepond/U-AT1-TINY" \ --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": "sagepond/U-AT1-TINY", "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 "sagepond/U-AT1-TINY" \ --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": "sagepond/U-AT1-TINY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sagepond/U-AT1-TINY with Docker Model Runner:
docker model run hf.co/sagepond/U-AT1-TINY
U-AT1
u-at1 is a compact, decoder-only Transformer designed for Luganda text completion in writing environments. It predicts the next token from text a user has already written, making it suitable for writing assistants, text editors, and applications that provide inline suggestions as users type.
The model uses sliding-window attention to support longer writing sessions while keeping attention computation bounded to a local context. Instead of attending to every token in an entire document, it focuses on a limited window of preceding tokens to predict what comes next.
With approximately 8 million parameters, the model provides a lightweight foundation for integrating Luganda autocomplete into applications where efficient inference and responsive suggestions matter.
Intended Use
- Writing assistance: Suggest continuations as users compose Luganda text.
- Inline autocomplete: Predict likely next tokens for real-time text editors and writing interfaces.
- Longer writing sessions: Support ongoing text generation using sliding-window attention.
- Luganda language tooling: Serve as a compact next-token prediction model for Luganda-focused applications.
This model is designed for autocomplete and text continuation.
Architecture
| Component | Configuration |
|---|---|
| Architecture | Decoder-only Transformer |
| Parameters | 8,002,644 |
| Vocabulary size | 40,000 |
| Hidden size | 156 |
| Transformer layers | 6 |
| Attention heads | 6 |
| Context window | 256 tokens |
| Attention | Sliding-window attention |
| Positional encoding | Rotary Position Embeddings (RoPE) |
| Feed-forward activation | GELU |
| Input/output embeddings | Tied |
| Framework | PyTorch |
| Integration | Hugging Face Transformers |
Sliding-Window Attention
The model uses sliding-window attention to bound the attention context during inference. This is useful in writing environments where the text being composed may extend well beyond a single local context window.
As generation proceeds, predictions are conditioned on the preceding context available within the model's attention window.
The 256-token context window describes the local attention context, not a guarantee that the model retains or reasons over every token in a longer document.
Usage
The model can be loaded through Hugging Face Transformers using its custom model implementation and tokenizer.
Predict the Next Token
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "sagepond/U-AT1-TINY"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True)
model.eval()
prompt = "Mukazi wange yagula "
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=True)
with torch.inference_mode():
logits = model(**inputs).logits
next_token_id = logits[0, -1].argmax().item()
prediction = tokenizer.decode([next_token_id])
print(f"Next-token prediction: {prediction!r}")
- Downloads last month
- 214