Instructions to use whitecircle/GLM-4.7-Flash-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use whitecircle/GLM-4.7-Flash-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="whitecircle/GLM-4.7-Flash-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("whitecircle/GLM-4.7-Flash-Coder") model = AutoModelForCausalLM.from_pretrained("whitecircle/GLM-4.7-Flash-Coder", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use whitecircle/GLM-4.7-Flash-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "whitecircle/GLM-4.7-Flash-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whitecircle/GLM-4.7-Flash-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/whitecircle/GLM-4.7-Flash-Coder
- SGLang
How to use whitecircle/GLM-4.7-Flash-Coder 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 "whitecircle/GLM-4.7-Flash-Coder" \ --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": "whitecircle/GLM-4.7-Flash-Coder", "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 "whitecircle/GLM-4.7-Flash-Coder" \ --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": "whitecircle/GLM-4.7-Flash-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use whitecircle/GLM-4.7-Flash-Coder with Docker Model Runner:
docker model run hf.co/whitecircle/GLM-4.7-Flash-Coder
Unfold Halo config section, remove leading br in details blocks
Browse files
README.md
CHANGED
|
@@ -50,8 +50,7 @@ We trained Coder with Supervised Fine-Tuning (SFT) using [Halo](https://github.c
|
|
| 50 |
- Learning rate scheduling: Cosine, with linear warm-up
|
| 51 |
- Training time: 3 hours on 16 B300 GPUs
|
| 52 |
|
| 53 |
-
|
| 54 |
-
<summary><h3>Halo 😇 is driven entirely by a single YAML config</h3></summary>
|
| 55 |
|
| 56 |
```yaml
|
| 57 |
model_name_or_path: zai-org/GLM-4.7-Flash
|
|
@@ -98,8 +97,6 @@ run_name: glm-4.7-flash-coder
|
|
| 98 |
enable_efficiency_metrics: true
|
| 99 |
```
|
| 100 |
|
| 101 |
-
</details>
|
| 102 |
-
|
| 103 |
## Emergent skills
|
| 104 |
|
| 105 |
The model picked up several of the teacher’s skills and patterns during fine-tuning:
|
|
@@ -200,7 +197,6 @@ Inference costs are calculated from OpenRouter pricing tables. We report the the
|
|
| 200 |
|
| 201 |
<details>
|
| 202 |
<summary>OpenRouter providers per model</summary>
|
| 203 |
-
<br>
|
| 204 |
|
| 205 |
| model | provider | input $/Mtok | output $/Mtok | cache_read $/Mtok | cache_write $/Mtok |
|
| 206 |
| --- | --- | --- | --- | --- | --- |
|
|
@@ -231,7 +227,6 @@ Inference costs are calculated from OpenRouter pricing tables. We report the the
|
|
| 231 |
|
| 232 |
<details>
|
| 233 |
<summary>Prompt template</summary>
|
| 234 |
-
<br>
|
| 235 |
|
| 236 |
```markdown
|
| 237 |
You are solving a real GitHub issue in the `{repo}` repository. The repo is already cloned and set up in the current working directory.
|
|
@@ -260,7 +255,6 @@ The following interfaces are expected by the test suite. Pay close attention to
|
|
| 260 |
|
| 261 |
<details>
|
| 262 |
<summary>Inference with SGLang 0.5.14, CUDA 13</summary>
|
| 263 |
-
<br>
|
| 264 |
|
| 265 |
```bash
|
| 266 |
python3 -m sglang_router.launch_server \
|
|
|
|
| 50 |
- Learning rate scheduling: Cosine, with linear warm-up
|
| 51 |
- Training time: 3 hours on 16 B300 GPUs
|
| 52 |
|
| 53 |
+
### Halo 😇 is driven entirely by a single YAML config
|
|
|
|
| 54 |
|
| 55 |
```yaml
|
| 56 |
model_name_or_path: zai-org/GLM-4.7-Flash
|
|
|
|
| 97 |
enable_efficiency_metrics: true
|
| 98 |
```
|
| 99 |
|
|
|
|
|
|
|
| 100 |
## Emergent skills
|
| 101 |
|
| 102 |
The model picked up several of the teacher’s skills and patterns during fine-tuning:
|
|
|
|
| 197 |
|
| 198 |
<details>
|
| 199 |
<summary>OpenRouter providers per model</summary>
|
|
|
|
| 200 |
|
| 201 |
| model | provider | input $/Mtok | output $/Mtok | cache_read $/Mtok | cache_write $/Mtok |
|
| 202 |
| --- | --- | --- | --- | --- | --- |
|
|
|
|
| 227 |
|
| 228 |
<details>
|
| 229 |
<summary>Prompt template</summary>
|
|
|
|
| 230 |
|
| 231 |
```markdown
|
| 232 |
You are solving a real GitHub issue in the `{repo}` repository. The repo is already cloned and set up in the current working directory.
|
|
|
|
| 255 |
|
| 256 |
<details>
|
| 257 |
<summary>Inference with SGLang 0.5.14, CUDA 13</summary>
|
|
|
|
| 258 |
|
| 259 |
```bash
|
| 260 |
python3 -m sglang_router.launch_server \
|