Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
4-bit precision
gptq
Instructions to use TheBloke/StableBeluga2-70B-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/StableBeluga2-70B-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/StableBeluga2-70B-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/StableBeluga2-70B-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/StableBeluga2-70B-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/StableBeluga2-70B-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/StableBeluga2-70B-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/StableBeluga2-70B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/StableBeluga2-70B-GPTQ
- SGLang
How to use TheBloke/StableBeluga2-70B-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/StableBeluga2-70B-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/StableBeluga2-70B-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/StableBeluga2-70B-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/StableBeluga2-70B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/StableBeluga2-70B-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/StableBeluga2-70B-GPTQ
Is this model TGI compatible?
#14
by MrAiran - opened
Whenever I try to load it in TGI I end up with this error, llama2 managed to load without problems
https://github.com/huggingface/text-generation-inference
text-generation-inference | File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 129, in <listcomp>
text-generation-inference | w = [self.get_tensor(f"{p}.g_idx") for p in prefixes]
text-generation-inference | File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 66, in get_tensor
text-generation-inference | filename, tensor_name = self.get_filename(tensor_name)
text-generation-inference | File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/weights.py", line 53, in get_filename
text-generation-inference | raise RuntimeError(f"weight {tensor_name} does not exist")
text-generation-inference | RuntimeError: weight model.layers.0.self_attn.q_proj.g_idx does not exist
text-generation-inference |
MrAiran changed discussion status to closed