Instructions to use second-state/C4AI-Command-R-v01-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use second-state/C4AI-Command-R-v01-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="second-state/C4AI-Command-R-v01-GGUF", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("second-state/C4AI-Command-R-v01-GGUF", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("second-state/C4AI-Command-R-v01-GGUF", trust_remote_code=True) - llama-cpp-python
How to use second-state/C4AI-Command-R-v01-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="second-state/C4AI-Command-R-v01-GGUF", filename="c4ai-command-r-v01-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use second-state/C4AI-Command-R-v01-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
Use Docker
docker model run hf.co/second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use second-state/C4AI-Command-R-v01-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "second-state/C4AI-Command-R-v01-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "second-state/C4AI-Command-R-v01-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
- SGLang
How to use second-state/C4AI-Command-R-v01-GGUF 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 "second-state/C4AI-Command-R-v01-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "second-state/C4AI-Command-R-v01-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "second-state/C4AI-Command-R-v01-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "second-state/C4AI-Command-R-v01-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use second-state/C4AI-Command-R-v01-GGUF with Ollama:
ollama run hf.co/second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
- Unsloth Studio
How to use second-state/C4AI-Command-R-v01-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for second-state/C4AI-Command-R-v01-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for second-state/C4AI-Command-R-v01-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for second-state/C4AI-Command-R-v01-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use second-state/C4AI-Command-R-v01-GGUF with Docker Model Runner:
docker model run hf.co/second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
- Lemonade
How to use second-state/C4AI-Command-R-v01-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull second-state/C4AI-Command-R-v01-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.C4AI-Command-R-v01-GGUF-Q4_K_M
List all available models
lemonade list
Xin Liu commited on
Commit ·
836fb1f
1
Parent(s): a0cd239
Update models
Browse filesSigned-off-by: Xin Liu <sam@secondstate.io>
- c4ai-command-r-v01-Q2_K.gguf +3 -0
- c4ai-command-r-v01-Q3_K_L.gguf +3 -0
- c4ai-command-r-v01-Q3_K_M.gguf +3 -0
- c4ai-command-r-v01-Q3_K_S.gguf +3 -0
- c4ai-command-r-v01-Q4_0.gguf +3 -0
- c4ai-command-r-v01-Q4_K_M.gguf +3 -0
- c4ai-command-r-v01-Q4_K_S.gguf +3 -0
- c4ai-command-r-v01-Q5_0.gguf +3 -0
- c4ai-command-r-v01-Q5_K_M.gguf +3 -0
- c4ai-command-r-v01-Q5_K_S.gguf +3 -0
- c4ai-command-r-v01-Q6_K.gguf +3 -0
- c4ai-command-r-v01-Q8_0.gguf +3 -0
c4ai-command-r-v01-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e3b92b948c9ca99683909a9ae87c64c9db6671dbefbdca0a832260452542e7e
|
| 3 |
+
size 13817395840
|
c4ai-command-r-v01-Q3_K_L.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73193d09450bd110911fb7cd935e877c156cdc2265308c99106224b928003d05
|
| 3 |
+
size 19149404800
|
c4ai-command-r-v01-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49d9ec2884cf4d6610de40073b2e78ad20b88365e443566b1a8df0d71dd7f78b
|
| 3 |
+
size 17618483840
|
c4ai-command-r-v01-Q3_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a31a184d77ec74f6d2c58fc3d4e66cb9abbcc851d151b90f391159936c54edf6
|
| 3 |
+
size 15862119040
|
c4ai-command-r-v01-Q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:406724a82fc195965bdbf10fb7beb43d79d02c04936a0c77f7ff056741687a56
|
| 3 |
+
size 20229438080
|
c4ai-command-r-v01-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac717b384a8923836fc58c4b8a0eb70d1dd36b0ac287bb1ded181c7dd6c6fa24
|
| 3 |
+
size 21527050880
|
c4ai-command-r-v01-Q4_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03802bdf9ab42232a5ff3a90dcf8e9aa2fe4e333ba59fc53e37d8b3a1f381712
|
| 3 |
+
size 20378335872
|
c4ai-command-r-v01-Q5_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2e62fbe7e6d584184228a4748cc4e95b6a1dfe8db6d467f0a7584c007be0d91
|
| 3 |
+
size 24339856000
|
c4ai-command-r-v01-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a61ec0f33b935587eb0b88dd908b9ced03f461b846b37328b4e691ece45b1749
|
| 3 |
+
size 25008323200
|
c4ai-command-r-v01-Q5_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dae6ceaa4c83f70c010685b816afb0e7c0f66e4cde5134cb391e800efa8edf6d
|
| 3 |
+
size 24339856000
|
c4ai-command-r-v01-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:131607a0813a83915ed82165318e59a61ddbe86b661b67a1b626a9233fa192a9
|
| 3 |
+
size 28707175040
|
c4ai-command-r-v01-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f851185d5334c2a773deeea1048f686fa19e6f20f1788a01c1319109fe21fb9d
|
| 3 |
+
size 37179013760
|