Instructions to use cortexso/qwen2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use cortexso/qwen2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="cortexso/qwen2", filename="qwen2-7b-instruct-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/qwen2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf cortexso/qwen2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf cortexso/qwen2: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/qwen2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf cortexso/qwen2: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/qwen2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf cortexso/qwen2: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/qwen2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf cortexso/qwen2:Q4_K_M
Use Docker
docker model run hf.co/cortexso/qwen2:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use cortexso/qwen2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cortexso/qwen2" # 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/qwen2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cortexso/qwen2:Q4_K_M
- Ollama
How to use cortexso/qwen2 with Ollama:
ollama run hf.co/cortexso/qwen2:Q4_K_M
- Unsloth Studio new
How to use cortexso/qwen2 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/qwen2 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/qwen2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cortexso/qwen2 to start chatting
- Docker Model Runner
How to use cortexso/qwen2 with Docker Model Runner:
docker model run hf.co/cortexso/qwen2:Q4_K_M
- Lemonade
How to use cortexso/qwen2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cortexso/qwen2:Q4_K_M
Run and chat with the model
lemonade run user.qwen2-Q4_K_M
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +10 -0
- qwen2-7b-instruct-q2_k.gguf +3 -0
- qwen2-7b-instruct-q3_k_l.gguf +3 -0
- qwen2-7b-instruct-q3_k_m.gguf +3 -0
- qwen2-7b-instruct-q3_k_s.gguf +3 -0
- qwen2-7b-instruct-q4_k_m.gguf +3 -0
- qwen2-7b-instruct-q4_k_s.gguf +3 -0
- qwen2-7b-instruct-q5_k_m.gguf +3 -0
- qwen2-7b-instruct-q5_k_s.gguf +3 -0
- qwen2-7b-instruct-q6_k.gguf +3 -0
- qwen2-7b-instruct-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 |
+
qwen2-7b-instruct-q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
qwen2-7b-instruct-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
qwen2-7b-instruct-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
qwen2-7b-instruct-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
qwen2-7b-instruct-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
qwen2-7b-instruct-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
qwen2-7b-instruct-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
qwen2-7b-instruct-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
qwen2-7b-instruct-q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
qwen2-7b-instruct-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
qwen2-7b-instruct-q2_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c5abea67cb916e475b873318c6b8bb921eca8c3d64bcf29c0ab978c2f0d4864
|
| 3 |
+
size 3015938016
|
qwen2-7b-instruct-q3_k_l.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a14939c3944324ab3e619e82be88de177d436cb772c58ea82c91c7915a8bd57c
|
| 3 |
+
size 4088457184
|
qwen2-7b-instruct-q3_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e62707f8b22c1a14311b3dd5d6127354ab8be78ba86f9a3e0130a922f7169be0
|
| 3 |
+
size 3808389088
|
qwen2-7b-instruct-q3_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a598c6910ded80c350b988c0a602e2c1236d981e62dd7968e3e53f052957be0b
|
| 3 |
+
size 3492366304
|
qwen2-7b-instruct-q4_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:25467f3f8d092e51e6a1ae669cf16ef58f12e38555de2ce017b3ecde07ef9b5f
|
| 3 |
+
size 4683071456
|
qwen2-7b-instruct-q4_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5964cc3ef2746dd492a409f0a8964922c4b5c685eb0fce5716c2f61ac62ed93
|
| 3 |
+
size 4457766880
|
qwen2-7b-instruct-q5_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:326ca2b41c6b695fc7c29d99ed50b9e55a4e766b4e3164ad4d9bc7041f4591ae
|
| 3 |
+
size 5444829152
|
qwen2-7b-instruct-q5_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70038070d33cce658f03b14fc0778bb14ad4947fc624ed418fca5abaf0f9c610
|
| 3 |
+
size 5315174368
|
qwen2-7b-instruct-q6_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c7674fe2716418744be2772890fa25bbf43decea3a3491f2dc0a489f21a6812
|
| 3 |
+
size 6254196704
|
qwen2-7b-instruct-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8f43ac62a14e71aefec9bc6f62df1b25aa7bb7385ad5cd6d6edc4cd9f9acfe3
|
| 3 |
+
size 8098523104
|