Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
grug
coding
tool-use
agentic
mtp
conversational
Instructions to use ProCreations/grug-27b-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ProCreations/grug-27b-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ProCreations/grug-27b-v2") 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("ProCreations/grug-27b-v2") model = AutoModelForMultimodalLM.from_pretrained("ProCreations/grug-27b-v2", device_map="auto") 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 ProCreations/grug-27b-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ProCreations/grug-27b-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ProCreations/grug-27b-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ProCreations/grug-27b-v2
- SGLang
How to use ProCreations/grug-27b-v2 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 "ProCreations/grug-27b-v2" \ --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": "ProCreations/grug-27b-v2", "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 "ProCreations/grug-27b-v2" \ --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": "ProCreations/grug-27b-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ProCreations/grug-27b-v2 with Docker Model Runner:
docker model run hf.co/ProCreations/grug-27b-v2
Set validated Grug generation defaults; preserve native effort template and integrated weights
Browse files- decoding_selection.json +18 -0
- generation_config.json +2 -1
- training_provenance.json +9 -2
decoding_selection.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"selected_template": "native effort instructions, default medium, canonical history normalization",
|
| 3 |
+
"sampling": {
|
| 4 |
+
"temperature": 0.6,
|
| 5 |
+
"top_p": 0.95,
|
| 6 |
+
"top_k": 20,
|
| 7 |
+
"repetition_penalty": 1.05
|
| 8 |
+
},
|
| 9 |
+
"development_labels": [
|
| 10 |
+
"development/decoding",
|
| 11 |
+
"development/decoding-t10"
|
| 12 |
+
],
|
| 13 |
+
"reason": "Native RP1.05 keeps a larger reasoning allowance than compact-prompt variants and performed better on medium development coding, with no unfinished repetitive loops in its development probes. Full release verification continues separately.",
|
| 14 |
+
"backbone_revision": "eb3994615a9c74115c11be960d761f2ab30b5690",
|
| 15 |
+
"integrated_mtp_revision": "feceb9810535346ba806a7974fa4eb71012ccded",
|
| 16 |
+
"template_changed_from_integrated_revision": false,
|
| 17 |
+
"weights_changed_from_integrated_revision": false
|
| 18 |
+
}
|
generation_config.json
CHANGED
|
@@ -9,5 +9,6 @@
|
|
| 9 |
"temperature": 0.6,
|
| 10 |
"top_k": 20,
|
| 11 |
"top_p": 0.95,
|
| 12 |
-
"transformers_version": "5.16.1"
|
|
|
|
| 13 |
}
|
|
|
|
| 9 |
"temperature": 0.6,
|
| 10 |
"top_k": 20,
|
| 11 |
"top_p": 0.95,
|
| 12 |
+
"transformers_version": "5.16.1",
|
| 13 |
+
"repetition_penalty": 1.05
|
| 14 |
}
|
training_provenance.json
CHANGED
|
@@ -8,5 +8,12 @@
|
|
| 8 |
"tokenizer_data_revision": "e12e39b899f962c2f87ef461808f68d510e4fb4a",
|
| 9 |
"release_template_sha256": "cd6193bb4cdc3ee69abd2ae9e15dc05ec3b85a48d161a623bdaae54009c0f995",
|
| 10 |
"template_compatibility": "Native canonical rendering preserved. Historical inline reasoning and reasoning alias normalized once.",
|
| 11 |
-
"mtp_training_receipt": "mtp_training.json"
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"tokenizer_data_revision": "e12e39b899f962c2f87ef461808f68d510e4fb4a",
|
| 9 |
"release_template_sha256": "cd6193bb4cdc3ee69abd2ae9e15dc05ec3b85a48d161a623bdaae54009c0f995",
|
| 10 |
"template_compatibility": "Native canonical rendering preserved. Historical inline reasoning and reasoning alias normalized once.",
|
| 11 |
+
"mtp_training_receipt": "mtp_training.json",
|
| 12 |
+
"generation_defaults": {
|
| 13 |
+
"temperature": 0.6,
|
| 14 |
+
"top_p": 0.95,
|
| 15 |
+
"top_k": 20,
|
| 16 |
+
"repetition_penalty": 1.05
|
| 17 |
+
},
|
| 18 |
+
"decoding_selection": "Native effort instructions retained; compact-prompt and temperature-1.0 alternatives inspected on reserved development tasks. A small repetition penalty improved completion without the compact-prompt coding regression."
|
| 19 |
+
}
|