Instructions to use Amu/t1-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Amu/t1-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Amu/t1-1.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Amu/t1-1.5B") model = AutoModelForCausalLM.from_pretrained("Amu/t1-1.5B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Amu/t1-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Amu/t1-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Amu/t1-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Amu/t1-1.5B
- SGLang
How to use Amu/t1-1.5B 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 "Amu/t1-1.5B" \ --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": "Amu/t1-1.5B", "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 "Amu/t1-1.5B" \ --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": "Amu/t1-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Amu/t1-1.5B with Docker Model Runner:
docker model run hf.co/Amu/t1-1.5B
Commit History
-
Rename pytorch_model-00002-of-00002.safetensors to model-00002-of-00002.safetensors
Verified signaturec716f5d -
Rename pytorch_model-00001-of-00002.safetensors to model-00001-of-00002.safetensors
Verified signature242b335 -
Upload model.safetensors.index.json (#6)
Verified signature- Upload model.safetensors.index.json (187b7db8f5b05a25d37c170ff1e53f684db55e35) Co-authored-by: Ammar <Daemontatox@users.noreply.huggingface.co>b092b23 -
Delete pytorch_model-00002-of-00002.bin (#5)
Verified signature- Delete pytorch_model-00002-of-00002.bin (57caaa552ce676ab259ebaf6fc2503a78019eee6) Co-authored-by: Ammar <Daemontatox@users.noreply.huggingface.co>661010e -
Delete pytorch_model-00001-of-00002.bin (#4)
Verified signature- Delete pytorch_model-00001-of-00002.bin (e244ef3cbe8fc704da9004b0a1dc3f989f82751b) Co-authored-by: Ammar <Daemontatox@users.noreply.huggingface.co>d512ec4 -
Delete pytorch_model.bin.index.json (#3)
Verified signature- Delete pytorch_model.bin.index.json (0de637c663a74a14571f9f42db9dfc822b92ab06) Co-authored-by: Ammar <Daemontatox@users.noreply.huggingface.co>94e7384
-
Update README.md (#2)
Verified signature- Update README.md (87555b44b8b2346309c7025d1342b7f9497e7991) Co-authored-by: Ammar <Daemontatox@users.noreply.huggingface.co>f30a726
-
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (efdb7809aa898bb0586a8811f34550505495c30e) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>d4e52b4 -
Update README.md
Verified signature1e2c3b1 -
Update README.md
Verified signaturec93af13 -
Update README.md
Verified signature9979dfe -
Update README.md
Verified signature9ee5e87 -
Update tokenizer_config.json
Verified signaturec829539 -
init
8b72f38 -
initial commit
Verified signature9b22bc2