Text Generation
Transformers
Safetensors
English
llama
unsloth
codellama
bnb
4-bit precision
text-generation-inference
bitsandbytes
Instructions to use unsloth/codellama-13b-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/codellama-13b-bnb-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/codellama-13b-bnb-4bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unsloth/codellama-13b-bnb-4bit") model = AutoModelForCausalLM.from_pretrained("unsloth/codellama-13b-bnb-4bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unsloth/codellama-13b-bnb-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/codellama-13b-bnb-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/codellama-13b-bnb-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/unsloth/codellama-13b-bnb-4bit
- SGLang
How to use unsloth/codellama-13b-bnb-4bit 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 "unsloth/codellama-13b-bnb-4bit" \ --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": "unsloth/codellama-13b-bnb-4bit", "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 "unsloth/codellama-13b-bnb-4bit" \ --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": "unsloth/codellama-13b-bnb-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/codellama-13b-bnb-4bit with Docker Model Runner:
docker model run hf.co/unsloth/codellama-13b-bnb-4bit
Commit History
-
Upload tokenizer
Verified signaturebe32ca1 -
Upload config
Verified signatureb9ae845 -
Upload config
Verified signaturec6de9f0
-
Upload tokenizer
Verified signature0ed1f50 -
Upload config
Verified signatureee595eb -
Upload config
Verified signaturea34bd25
-
Upload tokenizer
Verified signaturebc92b25 -
Upload config
Verified signaturec0b1bbe -
Upload config
Verified signature364f738
-
Upload tokenizer
Verified signature7db137c -
Upload config
Verified signature6918c3d -
Upload config
Verified signature6856985
-
Upload tokenizer
Verified signature8db96ee -
Upload config
Verified signaturea5a496a -
Upload config
Verified signature8732a51
-
Upload tokenizer
Verified signatured2947dd -
Upload config
Verified signature3847c4a -
Upload config
Verified signatureb6fc6b2
-
Upload tokenizer
Verified signature3ce12fe -
Upload config
Verified signatured96252e -
Upload config
Verified signaturee6721b2
-
Upload tokenizer
Verified signature65c6f53 -
Upload config
Verified signature8dd4dad -
Upload config
Verified signatured95148e -
Upload tokenizer
Verified signaturea56ee45 -
Upload config
Verified signature003c7d9 -
Upload config
Verified signature304eb40 -
Upload tokenizer
Verified signatureca7f3b6 -
Upload config
Verified signature963d20a -
Upload config
Verified signature24d6da1
-
Upload tokenizer
Verified signature8e82f18 -
Upload LlamaForCausalLM
Verified signature122bf48
-
Update README.md
Verified signature45a6d71 -
Update README.md
Verified signatureeb967ee -
Update README.md
Verified signaturea61163f
-
Upload tokenizer
Verified signature7291160 -
Upload LlamaForCausalLM
Verified signature566be7e -
initial commit
Verified signaturea183325