Text Generation
Transformers
Safetensors
English
Korean
tttpilot_mac
Test-time Training
Memory-augemted Transformer
conversational
custom_code
Instructions to use RetentionLabs/TTTPilot-Q-5B-Thinking-MAC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RetentionLabs/TTTPilot-Q-5B-Thinking-MAC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RetentionLabs/TTTPilot-Q-5B-Thinking-MAC", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("RetentionLabs/TTTPilot-Q-5B-Thinking-MAC", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RetentionLabs/TTTPilot-Q-5B-Thinking-MAC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RetentionLabs/TTTPilot-Q-5B-Thinking-MAC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RetentionLabs/TTTPilot-Q-5B-Thinking-MAC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RetentionLabs/TTTPilot-Q-5B-Thinking-MAC
- SGLang
How to use RetentionLabs/TTTPilot-Q-5B-Thinking-MAC 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 "RetentionLabs/TTTPilot-Q-5B-Thinking-MAC" \ --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": "RetentionLabs/TTTPilot-Q-5B-Thinking-MAC", "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 "RetentionLabs/TTTPilot-Q-5B-Thinking-MAC" \ --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": "RetentionLabs/TTTPilot-Q-5B-Thinking-MAC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RetentionLabs/TTTPilot-Q-5B-Thinking-MAC with Docker Model Runner:
docker model run hf.co/RetentionLabs/TTTPilot-Q-5B-Thinking-MAC
| { | |
| "model_type": "tttpilot_mac", | |
| "architectures": [ | |
| "TTTPilotMACForCausalLM" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "modeling_tttpilot_mac.TTTPilotMACConfig", | |
| "AutoModel": "modeling_tttpilot_mac.TTTPilotMACModel", | |
| "AutoModelForCausalLM": "modeling_tttpilot_mac.TTTPilotMACForCausalLM" | |
| }, | |
| "vocab_size": 151936, | |
| "bos_token_id": 151643, | |
| "eos_token_id": 151645, | |
| "pad_token_id": 151643, | |
| "tie_word_embeddings": true, | |
| "hidden_size": 2048, | |
| "hidden_act": "silu", | |
| "initializer_range": 0.02, | |
| "rms_norm_eps": 1e-06, | |
| "max_position_embeddings": 262144, | |
| "num_memory_layers": 24, | |
| "memory_intermediate_size": 5504, | |
| "num_attention_heads": 32, | |
| "mini_batch_size": 16, | |
| "ttt_base_lr": 1.0, | |
| "ttt_layer_type": "linear", | |
| "pre_conv": true, | |
| "conv_kernel": 4, | |
| "use_gate": true, | |
| "share_qk": true, | |
| "fixed_memory_size": 64, | |
| "num_core_layers": 36, | |
| "core_intermediate_size": 9728, | |
| "num_key_value_heads": 8, | |
| "head_dim": 128, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "rope_theta": 5000000, | |
| "rope_scaling": null, | |
| "sliding_window": null, | |
| "use_cache": true, | |
| "scan_checkpoint_group_size": 0, | |
| "torch_dtype": "bfloat16", | |
| "pretraining_tp": 1 | |
| } |