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
Update README.md
#5
by not-lain - opened
README.md
CHANGED
|
@@ -12,6 +12,8 @@ datasets:
|
|
| 12 |
metrics:
|
| 13 |
- MMLU
|
| 14 |
license: mit
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# LiteLlama: Reduced-Scale Llama
|
|
|
|
| 12 |
metrics:
|
| 13 |
- MMLU
|
| 14 |
license: mit
|
| 15 |
+
widget:
|
| 16 |
+
- text: "Q: What is the largest bird?\nA:"
|
| 17 |
---
|
| 18 |
|
| 19 |
# LiteLlama: Reduced-Scale Llama
|