Instructions to use Ammad1Ali/Llama-2-13B-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ammad1Ali/Llama-2-13B-Model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ammad1Ali/Llama-2-13B-Model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ammad1Ali/Llama-2-13B-Model") model = AutoModelForCausalLM.from_pretrained("Ammad1Ali/Llama-2-13B-Model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ammad1Ali/Llama-2-13B-Model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ammad1Ali/Llama-2-13B-Model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ammad1Ali/Llama-2-13B-Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ammad1Ali/Llama-2-13B-Model
- SGLang
How to use Ammad1Ali/Llama-2-13B-Model 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 "Ammad1Ali/Llama-2-13B-Model" \ --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": "Ammad1Ali/Llama-2-13B-Model", "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 "Ammad1Ali/Llama-2-13B-Model" \ --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": "Ammad1Ali/Llama-2-13B-Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ammad1Ali/Llama-2-13B-Model with Docker Model Runner:
docker model run hf.co/Ammad1Ali/Llama-2-13B-Model
Download pytorch_model-00003-of-00003.bin from Ammad1Ali/Llama-2-13B-Model: direct link, hf CLI and curl.
- Browser
- Download file 6.18 GB
-
https://huggingface.co/Ammad1Ali/Llama-2-13B-Model/resolve/main/pytorch_model-00003-of-00003.bin
- Command line
-
hf download hf://Ammad1Ali/Llama-2-13B-Model/pytorch_model-00003-of-00003.bin
-
curl -L -o pytorch_model-00003-of-00003.bin https://huggingface.co/Ammad1Ali/Llama-2-13B-Model/resolve/main/pytorch_model-00003-of-00003.bin
6.18 GB
- Xet hash:
- 2ec6556b51f1e79e293830f515612dc7196fbcac7e05b45a4e0e6728b7b506b9
- Size of remote file:
- 6.18 GB
- SHA256:
- 05f20154f0da3e7d9b91c8e245b23502887522d5b16fd19f47fb79050a677dee
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.