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
- 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 new
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-08-2024-q2_k.gguf +3 -0
- c4ai-command-r-08-2024-q3_k_l.gguf +3 -0
- c4ai-command-r-08-2024-q3_k_m.gguf +3 -0
- c4ai-command-r-08-2024-q3_k_s.gguf +3 -0
- c4ai-command-r-08-2024-q4_k_m.gguf +3 -0
- c4ai-command-r-08-2024-q4_k_s.gguf +3 -0
- c4ai-command-r-08-2024-q5_k_m.gguf +3 -0
- c4ai-command-r-08-2024-q5_k_s.gguf +3 -0
- c4ai-command-r-08-2024-q6_k.gguf +3 -0
- c4ai-command-r-08-2024-q8_0.gguf +3 -0
.gitattributes
CHANGED
|
@@ -44,3 +44,13 @@ 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 47 |
+
c4ai-command-r-08-2024-q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
c4ai-command-r-08-2024-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
c4ai-command-r-08-2024-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
c4ai-command-r-08-2024-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
c4ai-command-r-08-2024-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
c4ai-command-r-08-2024-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
c4ai-command-r-08-2024-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
c4ai-command-r-08-2024-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
c4ai-command-r-08-2024-q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
c4ai-command-r-08-2024-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
c4ai-command-r-08-2024-q2_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23762f7ee0d3574f0c2d8bd8fcd6435728a9854f741347d4984aecef28f4c2dd
|
| 3 |
+
size 12810767424
|
c4ai-command-r-08-2024-q3_k_l.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0512a0c4689ef547cc0c71baf1026530c8e1f2a9a02a3a485a7066fd369c1491
|
| 3 |
+
size 17563438144
|
c4ai-command-r-08-2024-q3_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db516924053c16f95027a9144aaabbdee9ba49a8d80de949236e63cdb556298a
|
| 3 |
+
size 16231746624
|
c4ai-command-r-08-2024-q3_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d25e54e5a100a9a3e7a5b505fd5ebeff0e29ea2de8c074878b90c86f69db74a1
|
| 3 |
+
size 14708689984
|
c4ai-command-r-08-2024-q4_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:63b17b9309d2b86c9edd6078cbc3d59606345ae3c56a7683d92290fc1be073d0
|
| 3 |
+
size 19800837184
|
c4ai-command-r-08-2024-q4_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cde65bb744241e32915179d31a58cf18285038221263e453e24114c6c3459a13
|
| 3 |
+
size 18849516608
|
c4ai-command-r-08-2024-q5_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba72260a94cbf57663938cf2449c6efef6ee01d1b09484dfb72343cad6766779
|
| 3 |
+
size 23051422784
|
c4ai-command-r-08-2024-q5_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a91a5c16960ea26155c84d0a86c8675e2a810e147f9a465913b34d49b7572600
|
| 3 |
+
size 22494366784
|
c4ai-command-r-08-2024-q6_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:012d11d8d2d158ff2a33f67309e0cb4521a0dd67b141ba6bf233e222e1e791d3
|
| 3 |
+
size 26505169984
|
c4ai-command-r-08-2024-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8794dcb14e45f7fdb829b7dd30ac2acc01d42d5dd6273aa7ebb4644ecdef5579
|
| 3 |
+
size 34326891584
|