Text Generation
Transformers
PyTorch
English
llama
llama2
llama-2
llama2 architecture
litellama
text-generation-inference
Instructions to use ahxt/LiteLlama-460M-1T with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ahxt/LiteLlama-460M-1T with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ahxt/LiteLlama-460M-1T")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ahxt/LiteLlama-460M-1T") model = AutoModelForCausalLM.from_pretrained("ahxt/LiteLlama-460M-1T") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ahxt/LiteLlama-460M-1T with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ahxt/LiteLlama-460M-1T" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ahxt/LiteLlama-460M-1T", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ahxt/LiteLlama-460M-1T
- SGLang
How to use ahxt/LiteLlama-460M-1T 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 "ahxt/LiteLlama-460M-1T" \ --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": "ahxt/LiteLlama-460M-1T", "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 "ahxt/LiteLlama-460M-1T" \ --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": "ahxt/LiteLlama-460M-1T", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ahxt/LiteLlama-460M-1T with Docker Model Runner:
docker model run hf.co/ahxt/LiteLlama-460M-1T
Upload folder using huggingface_hub
Browse files
onnx/decoder_model_merged.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc6fa7f4cbb14a7c07ac57ad8b6b9be5860f3c3eb1007b9800ab28897ac19ad9
|
| 3 |
+
size 1848295431
|
onnx/decoder_model_merged_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:868637e3fe8289095e8ceca9f3333446d572adda587ba9aa661b9d3e138a5cbc
|
| 3 |
+
size 463933294
|