Instructions to use cortexso/command-r with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use cortexso/command-r with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="cortexso/command-r", filename="c4ai-command-r-08-2024-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 cortexso/command-r with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf cortexso/command-r:Q4_K_M # Run inference directly in the terminal: llama-cli -hf cortexso/command-r:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf cortexso/command-r:Q4_K_M # Run inference directly in the terminal: llama-cli -hf cortexso/command-r: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 cortexso/command-r:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf cortexso/command-r: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 cortexso/command-r:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf cortexso/command-r:Q4_K_M
Use Docker
docker model run hf.co/cortexso/command-r:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use cortexso/command-r with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cortexso/command-r" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cortexso/command-r", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cortexso/command-r:Q4_K_M
- Ollama
How to use cortexso/command-r with Ollama:
ollama run hf.co/cortexso/command-r:Q4_K_M
- Unsloth Studio
How to use cortexso/command-r 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 cortexso/command-r 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 cortexso/command-r to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cortexso/command-r to start chatting
- Docker Model Runner
How to use cortexso/command-r with Docker Model Runner:
docker model run hf.co/cortexso/command-r:Q4_K_M
- Lemonade
How to use cortexso/command-r with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cortexso/command-r:Q4_K_M
Run and chat with the model
lemonade run user.command-r-Q4_K_M
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +10 -0
- 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_k_m.gguf +3 -0
- c4ai-command-r-v01-q4_k_s.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
.gitattributes
CHANGED
|
@@ -34,3 +34,13 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
model.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
model.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
c4ai-command-r-v01-q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
c4ai-command-r-v01-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
c4ai-command-r-v01-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
c4ai-command-r-v01-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
c4ai-command-r-v01-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
c4ai-command-r-v01-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
c4ai-command-r-v01-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
c4ai-command-r-v01-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
c4ai-command-r-v01-q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
c4ai-command-r-v01-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
c4ai-command-r-v01-q2_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb2d1e89b0a26fbf2d0f20212053fc74c6bdfb7a2ef022ddb4b1f48f162741ea
|
| 3 |
+
size 13817400256
|
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:773104d567d991371287a07c470d02c249693caab234bfe65440e57a0f746ac9
|
| 3 |
+
size 19149409216
|
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:490d079a2b7e7e34da6802fa2070334f7d6bddfcf2bbbc44a66a0b09eedabca7
|
| 3 |
+
size 17618488256
|
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:2b56704ab95caf5fdde591348cf224d263a172a2932d4df414396033f7a88de6
|
| 3 |
+
size 15862123456
|
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:bf87607f2107c31dd1ffff61877dc6e928fb130aec4f4acc077a1476c7d3625b
|
| 3 |
+
size 21527055296
|
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:b42ac79faa91930ef3ac868d617125d7a25bd76125dafb7d8b0a86a35aaa38b7
|
| 3 |
+
size 20378340288
|
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:1a0fd977cfea9a193db36d8bfb0a592d5acd6988237009f0cea8a22eb527162c
|
| 3 |
+
size 25008327616
|
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:42a659ea359f022a3c4a16f4f36a9ed973a6692f41b592d7b3dff9f775021656
|
| 3 |
+
size 24339860416
|
c4ai-command-r-v01-q6_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d028823472a2ea9176a789f5c798e5f1634dd43b887904b1499c2aa15045c60d
|
| 3 |
+
size 28707179456
|
c4ai-command-r-v01-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd7dfb674ea88521c91853884bfd6895242f7c4de9b51aa0911ba4e27def5c0d
|
| 3 |
+
size 37179018176
|