Text Generation
Transformers
Safetensors
English
llama
ternary1b
quantization
ternary
smollm2
bitnet
text-generation-inference
Instructions to use AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET") model = AutoModelForCausalLM.from_pretrained("AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET
- SGLang
How to use AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET 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 "AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET" \ --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": "AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET", "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 "AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET" \ --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": "AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET with Docker Model Runner:
docker model run hf.co/AmareshHebbar/Ternary1B_SmolLM2_1.7B_BITNET
Commit History
7 days ago
-
Add headline.json
Verified signature844ebf5 -
Add HEADLINE.md
Verified signaturef565323 -
Add bitnet_publish.log
Verified signatureae05656 -
Add bitnet_evalgen.log
Verified signature91d250f -
Add bitnet_verify.log
Verified signature969e96a -
Add bitnet_push.log
Verified signaturec24acd4 -
Add bitnet_train.log
Verified signature6baa6d3 -
Update model card with evaluation results
Verified signature18bdc15 -
Update model card with evaluation results
Verified signature3e65500 -
Add quick eval results
Verified signatured437f64 -
Add full eval results
Verified signature4934c93 -
Add size_vs_quality.png
Verified signature48e2eb1 -
Add benchmarks.png
Verified signature38dd4a2 -
Upload training logs
Verified signature8cb92e0 -
Upload Ternary1B BITNET weights
Verified signature7e21778 -
initial commit
Verified signature11e16d1