Instructions to use OPENGCM/GCM-MARK-II with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OPENGCM/GCM-MARK-II with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OPENGCM/GCM-MARK-II") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("OPENGCM/GCM-MARK-II") model = AutoModelForMultimodalLM.from_pretrained("OPENGCM/GCM-MARK-II") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OPENGCM/GCM-MARK-II with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OPENGCM/GCM-MARK-II" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OPENGCM/GCM-MARK-II", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/OPENGCM/GCM-MARK-II
- SGLang
How to use OPENGCM/GCM-MARK-II 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 "OPENGCM/GCM-MARK-II" \ --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": "OPENGCM/GCM-MARK-II", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "OPENGCM/GCM-MARK-II" \ --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": "OPENGCM/GCM-MARK-II", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use OPENGCM/GCM-MARK-II with Docker Model Runner:
docker model run hf.co/OPENGCM/GCM-MARK-II
Updated README
Browse files
README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- ise-uiuc/Magicoder-OSS-Instruct-75K
|
| 5 |
+
- ise-uiuc/Magicoder-Evol-Instruct-110K
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
- zh
|
| 9 |
+
- ja
|
| 10 |
+
- de
|
| 11 |
+
- es
|
| 12 |
+
base_model:
|
| 13 |
+
- Qwen/Qwen3.5-9B
|
| 14 |
+
tags:
|
| 15 |
+
- gcm
|
| 16 |
+
- qwen3_5
|
| 17 |
+
- reasoning
|
| 18 |
+
- qwen
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
<div align="center">
|
| 22 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/69c842686cf758859915159c/EfCpXkcGtQhv02oKAy2La.png" width="700">
|
| 23 |
+
</div>
|
| 24 |
+
|
| 25 |
+
# GCM Mark II
|
| 26 |
+
|
| 27 |
+
GCM Mark II is a QLoRA fine-tune of **Qwen3.5-9B**, trained to improve coding reliability — specifically constraint-following, edge-case handling, and reducing invented/hallucinated API usage.
|
| 28 |
+
|
| 29 |
+
<div align="center">
|
| 30 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/69c842686cf758859915159c/L4Aa_zxIgHRi_qkIsGrjP.png" width="700">
|
| 31 |
+
</div>
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
## Model Details
|
| 35 |
+
|
| 36 |
+
- **Base model:** Qwen3.5-9B
|
| 37 |
+
- **Fine-tuning method:** QLoRA & CPT
|
| 38 |
+
- **Tokens trained:** ~2.5 Million
|
| 39 |
+
- **Training data:** [`ise-uiuc/Magicoder-Evol-Instruct-110K`](https://huggingface.co/datasets/ise-uiuc/Magicoder-Evol-Instruct-110K) (partial epoch)
|
| 40 |
+
- **License:** Apache 2.0
|
| 41 |
+
|
| 42 |
+
## Intended Use
|
| 43 |
+
|
| 44 |
+
General-purpose code generation and coding assistance across multiple languages (Python, JavaScript, Go, C, C++, Java, Rust tested directly). Not evaluated for production/safety-critical code without independent review — see Known Limitations below.
|
| 45 |
+
|
| 46 |
+
## Benchmark Results
|
| 47 |
+
|
| 48 |
+
Evaluated on a custom 20-question coding eval (mixed languages, weighted toward hard/edge-case problems), hand-graded, single greedy pass, thinking mode enabled. Full methodology, per-question breakdown, and comparison against OpenGCM-v2 and base Qwen3.5-9B are in [`BENCHMARK.md`](./BENCHMARK.md) in this repo.
|
| 49 |
+
|
| 50 |
+
| Model | Score |
|
| 51 |
+
|---|---|
|
| 52 |
+
| OpenGCM-v2 | 17/20 (85%) |
|
| 53 |
+
| **GCM Mark II** | **16/20 (80%)** |
|
| 54 |
+
| Qwen3.5-9B (base) | 6/20 (30%)* |
|
| 55 |
+
|
| 56 |
+
*Base model score includes multiple non-completions rather than purely incorrect answers — see `BENCHMARK.md` for details.
|
| 57 |
+
|
| 58 |
+
This comparison is reported as-is, including the result where a competing model scored higher, because the point of publishing it is to be checkable, not to win. n=20 is a small sample — treat these numbers as directional, not definitive, and feel free to reproduce or challenge them.
|
| 59 |
+
|
| 60 |
+
**Qualitative note:** GCM Mark II generated responses quickly and reliably across all 20 questions, with no incomplete generations or stuck reasoning loops — worth weighing alongside the raw accuracy numbers if generation reliability matters for your use case.
|
| 61 |
+
|
| 62 |
+
## Known Limitations
|
| 63 |
+
|
| 64 |
+
- **Directed graph algorithms:** GCM Mark II has a specific, reproducible weakness in cycle detection on directed graphs — it can conflate "visited" with "currently on the active recursion path," causing false-positive cycle detection on some acyclic graphs (e.g. diamond-shaped DAGs). If you're using this model for graph algorithms, verify output independently.
|
| 65 |
+
- Small eval sample (n=20) — broader capability outside the tested question set is not guaranteed.
|
| 66 |
+
- Not evaluated against standardized public benchmarks (HumanEval, LiveCodeBench, MBPP) yet — evaluation attempted but blocked by local tooling issues during development; may be added in a future update.
|
| 67 |
+
|
| 68 |
+
## How to Use
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 72 |
+
|
| 73 |
+
model = AutoModelForCausalLM.from_pretrained("OPENGCM/GCM-MARK-II", device_map="auto")
|
| 74 |
+
tokenizer = AutoTokenizer.from_pretrained("OPENGCM/GCM-MARK-II")
|
| 75 |
+
|
| 76 |
+
messages = [{"role": "user", "content": "Write a function to check if a binary tree is balanced."}]
|
| 77 |
+
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 78 |
+
outputs = model.generate(inputs, max_new_tokens=1024)
|
| 79 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
## Citation / Attribution
|
| 83 |
+
|
| 84 |
+
Base model: Qwen3.5-9B (Qwen team).
|
| 85 |
+
Training data: Magicoder-Evol-Instruct-110K (ise-uiuc).
|
| 86 |
+
|
| 87 |
+
# Ollama / GGUF Support
|
| 88 |
+
OpenGCM is actively working on .gguf files for quantized versions of GCM Mark II. Stay tuned!
|