Instructions to use openerotica/c4ai-command-r-plus-GPTQ-ERQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openerotica/c4ai-command-r-plus-GPTQ-ERQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openerotica/c4ai-command-r-plus-GPTQ-ERQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openerotica/c4ai-command-r-plus-GPTQ-ERQ") model = AutoModelForCausalLM.from_pretrained("openerotica/c4ai-command-r-plus-GPTQ-ERQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openerotica/c4ai-command-r-plus-GPTQ-ERQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openerotica/c4ai-command-r-plus-GPTQ-ERQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openerotica/c4ai-command-r-plus-GPTQ-ERQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openerotica/c4ai-command-r-plus-GPTQ-ERQ
- SGLang
How to use openerotica/c4ai-command-r-plus-GPTQ-ERQ 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 "openerotica/c4ai-command-r-plus-GPTQ-ERQ" \ --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": "openerotica/c4ai-command-r-plus-GPTQ-ERQ", "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 "openerotica/c4ai-command-r-plus-GPTQ-ERQ" \ --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": "openerotica/c4ai-command-r-plus-GPTQ-ERQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openerotica/c4ai-command-r-plus-GPTQ-ERQ with Docker Model Runner:
docker model run hf.co/openerotica/c4ai-command-r-plus-GPTQ-ERQ
c4ai-command-r-plus, quantized to GPTQ with these parameters:
python3 quant.py aCohereForAI/c4ai-command-r-plus /workspace/commandplus custom --bits 4 --group_size 128 --desc_act 1 --damp 0.1 --dtype float16 --seqlen 16384 --num_samples 256 --cache_examples 0 --trust_remote_code
The dataset used was openerotica/erotiquant2. I have included a script reconstitute.py to merge the files into one. Depending on the backend you might need to delete the index file after the files have been merged. I'll try to do this all in a better way once I work after I test out how marlin stacks up to exl2 for this model.
- Downloads last month
- 2
docker model run hf.co/openerotica/c4ai-command-r-plus-GPTQ-ERQ