Text Generation
Transformers
Safetensors
English
qwen3
tinker
tinker-cookbook
bedrock-edition
minecraft-addon
mod-conversion
anti-hallucination
conversational
text-generation-inference
Instructions to use alexchapin/portkit-coder-8b-grpo8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alexchapin/portkit-coder-8b-grpo8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alexchapin/portkit-coder-8b-grpo8") 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("alexchapin/portkit-coder-8b-grpo8") model = AutoModelForCausalLM.from_pretrained("alexchapin/portkit-coder-8b-grpo8", 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 alexchapin/portkit-coder-8b-grpo8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alexchapin/portkit-coder-8b-grpo8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alexchapin/portkit-coder-8b-grpo8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/alexchapin/portkit-coder-8b-grpo8
- SGLang
How to use alexchapin/portkit-coder-8b-grpo8 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 "alexchapin/portkit-coder-8b-grpo8" \ --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": "alexchapin/portkit-coder-8b-grpo8", "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 "alexchapin/portkit-coder-8b-grpo8" \ --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": "alexchapin/portkit-coder-8b-grpo8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use alexchapin/portkit-coder-8b-grpo8 with Docker Model Runner:
docker model run hf.co/alexchapin/portkit-coder-8b-grpo8
Update model card with training details and anti-hallucination fixes
Browse files
README.md
CHANGED
|
@@ -12,18 +12,51 @@ tags:
|
|
| 12 |
- bedrock-edition
|
| 13 |
- minecraft-addon
|
| 14 |
- mod-conversion
|
| 15 |
-
-
|
| 16 |
-
- grpo8
|
| 17 |
---
|
| 18 |
|
| 19 |
# alexchapin/portkit-coder-8b-grpo8
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
## Model
|
| 24 |
|
| 25 |
-
- **Base model:**
|
| 26 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
## Usage
|
| 29 |
|
|
@@ -33,8 +66,8 @@ from transformers import AutoModelForCausalLM
|
|
| 33 |
model = AutoModelForCausalLM.from_pretrained("alexchapin/portkit-coder-8b-grpo8")
|
| 34 |
```
|
| 35 |
|
| 36 |
-
## Framework
|
| 37 |
|
| 38 |
- tinker-cookbook: 0.4.1
|
| 39 |
- transformers: 5.5.3
|
| 40 |
-
- torch: 2.
|
|
|
|
| 12 |
- bedrock-edition
|
| 13 |
- minecraft-addon
|
| 14 |
- mod-conversion
|
| 15 |
+
- anti-hallucination
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# alexchapin/portkit-coder-8b-grpo8
|
| 19 |
|
| 20 |
+
Anti-hallucination focused GRPO fine-tuned model for Minecraft Java (Forge) to Bedrock Add-on conversion.
|
| 21 |
|
| 22 |
+
## Model Details
|
| 23 |
|
| 24 |
+
- **Base model:** Qwen/Qwen3-8B
|
| 25 |
+
- **Training method:** GRPO with anti-hallucination focus
|
| 26 |
+
- **Checkpoint:** GRPO8 final (50 steps, group_size=16-20)
|
| 27 |
+
- **Learning rate:** 5e-7
|
| 28 |
+
|
| 29 |
+
## Reward Components
|
| 30 |
+
|
| 31 |
+
| Component | Weight | Description |
|
| 32 |
+
|-----------|--------|-------------|
|
| 33 |
+
| manifest | 0.10 | UUID v4, version array, module type validation |
|
| 34 |
+
| real_api | 0.25 | Event subscription + API chain depth |
|
| 35 |
+
| anti_hallucination | 0.25 | Hallucination penalties (shifted to 0.5-1.0) |
|
| 36 |
+
| concise | 0.15 | Output length optimization |
|
| 37 |
+
| code_bleu | 0.25 | Token overlap in code blocks |
|
| 38 |
+
|
| 39 |
+
## Anti-Hallucination Fixes
|
| 40 |
+
|
| 41 |
+
- **Issue #1582**: Hardened hallucination detection with comprehensive fake API patterns
|
| 42 |
+
- **Issue #1583**: Real API fixes (event subscription, API chain depth)
|
| 43 |
+
- **Issue #1584**: GRPO Stabilization (group_size 16, lr 5e-7, clipped surrogate)
|
| 44 |
+
- **Issue #1586**: Manifest fixes (UUID v4, version array, module type)
|
| 45 |
+
|
| 46 |
+
## Hard Hallucination Patterns (NEVER valid in Bedrock)
|
| 47 |
+
|
| 48 |
+
- ServerPlayerAPI, ServerPlayer, PlayerAPI
|
| 49 |
+
- WorldEvent, BlockEntityAPI, EntityPlayerAPI, WorldAPI
|
| 50 |
+
- require('@minecraft/server')
|
| 51 |
+
- registerMod(), getServer(), Server.getInstance()
|
| 52 |
+
- event.level, server.getWorld
|
| 53 |
+
|
| 54 |
+
## Real Bedrock APIs (ALWAYS valid)
|
| 55 |
+
|
| 56 |
+
- world.afterEvents, world.beforeEvents
|
| 57 |
+
- system.runInterval, system.runTimeout
|
| 58 |
+
- player.sendMessage, player.getComponent
|
| 59 |
+
- { world, system, player } imports from @minecraft/server
|
| 60 |
|
| 61 |
## Usage
|
| 62 |
|
|
|
|
| 66 |
model = AutoModelForCausalLM.from_pretrained("alexchapin/portkit-coder-8b-grpo8")
|
| 67 |
```
|
| 68 |
|
| 69 |
+
## Framework Versions
|
| 70 |
|
| 71 |
- tinker-cookbook: 0.4.1
|
| 72 |
- transformers: 5.5.3
|
| 73 |
+
- torch: 2.11.0+rocm7.2
|