Text Generation
Transformers
qwen2
LLM Agent
Knowledge Graph
Question Answering
Reasoning
conversational
Instructions to use xushuwen23/GraphWalker-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xushuwen23/GraphWalker-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xushuwen23/GraphWalker-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("xushuwen23/GraphWalker-7B") model = AutoModelForMultimodalLM.from_pretrained("xushuwen23/GraphWalker-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xushuwen23/GraphWalker-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xushuwen23/GraphWalker-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xushuwen23/GraphWalker-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xushuwen23/GraphWalker-7B
- SGLang
How to use xushuwen23/GraphWalker-7B 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 "xushuwen23/GraphWalker-7B" \ --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": "xushuwen23/GraphWalker-7B", "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 "xushuwen23/GraphWalker-7B" \ --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": "xushuwen23/GraphWalker-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xushuwen23/GraphWalker-7B with Docker Model Runner:
docker model run hf.co/xushuwen23/GraphWalker-7B
Commit ·
126832d
1
Parent(s): 63330cc
Update pipeline tag and add library name (#1)
Browse files- Update pipeline tag and add library name (26cacf5321d65fdb9a883fe819191d6e11dce066)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
base_model:
|
| 4 |
- Qwen/Qwen2.5-7B-Instruct
|
| 5 |
-
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
- LLM Agent
|
| 8 |
- Knowledge Graph
|
|
@@ -37,7 +38,7 @@ pip install vllm transformers
|
|
| 37 |
|
| 38 |
```bash
|
| 39 |
# Via huggingface-cli
|
| 40 |
-
huggingface-cli download
|
| 41 |
```
|
| 42 |
|
| 43 |
### 3. Inference with vLLM (Recommended)
|
|
@@ -45,7 +46,7 @@ huggingface-cli download <your-org>/GraphWalker-7B --local-dir ./GraphWalker-7B
|
|
| 45 |
**Start the vLLM server:**
|
| 46 |
|
| 47 |
```bash
|
| 48 |
-
vllm serve "
|
| 49 |
--host 0.0.0.0 --port 22240 \
|
| 50 |
--served-model-name graphwalker-7b \
|
| 51 |
--gpu-memory-utilization 0.9 \
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model:
|
| 3 |
- Qwen/Qwen2.5-7B-Instruct
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
tags:
|
| 8 |
- LLM Agent
|
| 9 |
- Knowledge Graph
|
|
|
|
| 38 |
|
| 39 |
```bash
|
| 40 |
# Via huggingface-cli
|
| 41 |
+
huggingface-cli download xushuwen23/GraphWalker-7B --local-dir ./GraphWalker-7B
|
| 42 |
```
|
| 43 |
|
| 44 |
### 3. Inference with vLLM (Recommended)
|
|
|
|
| 46 |
**Start the vLLM server:**
|
| 47 |
|
| 48 |
```bash
|
| 49 |
+
vllm serve "xushuwen23/GraphWalker-7B" \
|
| 50 |
--host 0.0.0.0 --port 22240 \
|
| 51 |
--served-model-name graphwalker-7b \
|
| 52 |
--gpu-memory-utilization 0.9 \
|