Text Generation
Transformers
PyTorch
Safetensors
English
llama
facebook
meta
llama-2
text-generation-inference
Instructions to use ValdoLab/base_model_llama-2-70b-chat-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ValdoLab/base_model_llama-2-70b-chat-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ValdoLab/base_model_llama-2-70b-chat-hf")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ValdoLab/base_model_llama-2-70b-chat-hf") model = AutoModelForCausalLM.from_pretrained("ValdoLab/base_model_llama-2-70b-chat-hf") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ValdoLab/base_model_llama-2-70b-chat-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ValdoLab/base_model_llama-2-70b-chat-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ValdoLab/base_model_llama-2-70b-chat-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ValdoLab/base_model_llama-2-70b-chat-hf
- SGLang
How to use ValdoLab/base_model_llama-2-70b-chat-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 "ValdoLab/base_model_llama-2-70b-chat-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": "ValdoLab/base_model_llama-2-70b-chat-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 "ValdoLab/base_model_llama-2-70b-chat-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": "ValdoLab/base_model_llama-2-70b-chat-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ValdoLab/base_model_llama-2-70b-chat-hf with Docker Model Runner:
docker model run hf.co/ValdoLab/base_model_llama-2-70b-chat-hf
Ctrl+K
- 1.58 kB
- 7.02 kB
- 7.23 kB
- 9.87 kB
- 1.25 MB xet
- 4.77 kB
- 21 Bytes
- 635 Bytes
- 175 Bytes
- 9.85 GB xet
- 9.8 GB xet
- 9.97 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.97 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.97 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.5 GB xet
- 524 MB xet
- 66.7 kB
- 9.85 GB xet
- 9.8 GB xet
- 9.97 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.97 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.97 GB xet
- 9.8 GB xet
- 9.8 GB xet
- 9.5 GB xet
- 524 MB xet
- 66.7 kB
- 435 Bytes
- 500 kB xet
- 746 Bytes