Instructions to use TheBloke/Phind-CodeLlama-34B-v2-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/Phind-CodeLlama-34B-v2-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/Phind-CodeLlama-34B-v2-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/Phind-CodeLlama-34B-v2-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/Phind-CodeLlama-34B-v2-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/Phind-CodeLlama-34B-v2-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/Phind-CodeLlama-34B-v2-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/Phind-CodeLlama-34B-v2-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ
- SGLang
How to use TheBloke/Phind-CodeLlama-34B-v2-GPTQ 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/Phind-CodeLlama-34B-v2-GPTQ" \ --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/Phind-CodeLlama-34B-v2-GPTQ", "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/Phind-CodeLlama-34B-v2-GPTQ" \ --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/Phind-CodeLlama-34B-v2-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/Phind-CodeLlama-34B-v2-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ
Not able to load in oobabooga webui
Hello,
I have downloaded this model but when I tries to load it in the webui, my pc gets hang, no response, no error message. I just have to hard reboot the pc. Kindly tell me how do I load it.
How many GPUs and VRAM for each? It is very likely that loading the model into VRAM has kicked out your PC display program from VRAM.
You would need to limit the VRAM for each GPU in the Model section of textgen by draging the VRAM slider.
How many GPUs and VRAM for each? It is very likely that loading the model into VRAM has kicked out your PC display program from VRAM.
You would need to limit the VRAM for each GPU in the Model section of textgen by draging the VRAM slider.
Will you please mention what are the hardware requirements for successful and smooth working?
I am working with 2x3090 (24G vram each) ubuntu PC with 256GB ram.
You would need at least 24G vram (a single 3090 or 4090) to run 30B models.
OMG! Two Nvidia 3090 Cost around 4,22,000 INR and 256GB RAM!
It seems like PC's costing around 2000000 INR. For such a RAM, VRAM, I need that much compatible Motherboard, SSD too. Its just far beyond my paying capacity.
Thanks for your kind replies.
You only need one 3090 to run it. I got my 3090 used on ebay for $700, thats about 58,000 inr. I have 32gb ram.
I am working with 2x3090 (24G vram each) ubuntu PC with 256GB ram.
You would need at least 24G vram (a single 3090 or 4090) to run 30B models.
@GirishSharma My setup is for inferencing 70B and beyond models or running fine-tuning pipeline for smaller models locally.