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