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