Instructions to use mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ") model = AutoModelForCausalLM.from_pretrained("mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ
- SGLang
How to use mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ 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 "mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ" \ --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": "mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ", "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 "mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ" \ --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": "mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ with Docker Model Runner:
docker model run hf.co/mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ
no run
Can
mobiuslabsgmbh/Llama-2-70b-hf-2bit_g16_s128-HQQ
run in Colab T4?
This is a very old model which is not compatible with >=v0.2. You can either install an old version of hqq, or you can quantize the model on-the-fly in transformers.
https://github.com/mobiusml/hqq/?tab=readme-ov-file#transformers-
thank you
Have you converted?
Llama-3.3-70b
to
2bit
?????????????
or
Llama-3.1-70b
to
2bit
mobiuslabsgmbh/Hermes-3-Llama-3.1-70B_4bitgs64_hqq
42gb
big
Can it be run in Colab T4
or
kaggle 32gb
vram