Instructions to use TheBloke/CodeLlama-7B-Instruct-GGML with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-7B-Instruct-GGML with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-7B-Instruct-GGML")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-7B-Instruct-GGML", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/CodeLlama-7B-Instruct-GGML with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/CodeLlama-7B-Instruct-GGML" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/CodeLlama-7B-Instruct-GGML", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-7B-Instruct-GGML
- SGLang
How to use TheBloke/CodeLlama-7B-Instruct-GGML 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 "TheBloke/CodeLlama-7B-Instruct-GGML" \ --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": "TheBloke/CodeLlama-7B-Instruct-GGML", "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 "TheBloke/CodeLlama-7B-Instruct-GGML" \ --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": "TheBloke/CodeLlama-7B-Instruct-GGML", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/CodeLlama-7B-Instruct-GGML with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-7B-Instruct-GGML
Commit History
-
Update base_model formatting
09f402d
-
Upload README.md
b5a0340
-
Initial GGML model commit
5eeec07 -
Initial GGML model commit
2434a74 -
Add Llama 2 license files
4aa23c2 -
Add Llama 2 license files
e8fe5b5 -
Add Llama 2 license files
0a81beb -
Initial GGML model commit
ab3f6dd -
Add Llama 2 license files
94c512a -
Add Llama 2 license files
f2cf581 -
Add Llama 2 license files
cf3c452 -
Initial GGML model commit
78583eb -
Initial GGML model commit
054ea68 -
Add Llama 2 license files
935dbee -
Add Llama 2 license files
4651726 -
Add Llama 2 license files
19fbd4c
-
Initial GGML model commit
ea2e7dc -
Initial GGML model commit
7ec8a1d -
Add Llama 2 license files
dc2dc50 -
Add Llama 2 license files
e5675dd -
Add Llama 2 license files
e756293 -
Initial GGML model commit
cdcc8b3 -
Initial GGML model commit
6c8daaa -
Initial GGML model commit
820b298 -
Initial GGML model commit
f0b55d0 -
Initial GGML model commit
fcda137 -
Initial GGML model commit
1e0ecfa -
Initial GGML model commit
ed32700 -
Initial GGML model commit
66c9e9a -
Initial GGML model commit
8966ef5 -
Initial GGML model commit
95fdf39 -
Initial GGML model commit
285c1d5 -
Initial GGML model commit
4726421 -
Initial GGML model commit
832f915 -
Initial GGML model commit
ba88775 -
initial commit
d1235e4