Text Generation
Transformers
Safetensors
code
English
llama
python
code-completion
fill-in-the-middle
fim
text-generation-inference
Instructions to use Bayhakl1/GrimmCoder_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Bayhakl1/GrimmCoder_v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Bayhakl1/GrimmCoder_v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Bayhakl1/GrimmCoder_v2") model = AutoModelForCausalLM.from_pretrained("Bayhakl1/GrimmCoder_v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Bayhakl1/GrimmCoder_v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Bayhakl1/GrimmCoder_v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bayhakl1/GrimmCoder_v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Bayhakl1/GrimmCoder_v2
- SGLang
How to use Bayhakl1/GrimmCoder_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 "Bayhakl1/GrimmCoder_v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bayhakl1/GrimmCoder_v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Bayhakl1/GrimmCoder_v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bayhakl1/GrimmCoder_v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Bayhakl1/GrimmCoder_v2 with Docker Model Runner:
docker model run hf.co/Bayhakl1/GrimmCoder_v2
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,7 +19,7 @@ tags:
|
|
| 19 |
|
| 20 |
# GrimmCoder (PyEdu Finetuned)
|
| 21 |
|
| 22 |
-
**
|
| 23 |
|
| 24 |
This release represents **Phase 2 finetuning** on `Avelina/python-edu-cleaned` (774.1M tokens, 6,000 steps with cosine decay `1e-4 → 1e-5`), initialized from the 8B-token `bigcode/starcoderdata` pretrain base checkpoint.
|
| 25 |
|
|
@@ -44,8 +44,8 @@ Evaluated on [`openai/openai_humaneval`](https://huggingface.co/datasets/openai/
|
|
| 44 |
|
| 45 |
| Model Version | Decoding | `pass@1` | Solved | Syntax Valid |
|
| 46 |
|---|---|---|---|---|
|
| 47 |
-
| **
|
| 48 |
-
| **
|
| 49 |
| GrimmCoder (Base Pretrain, Step 61,500) | greedy (`do_sample=False`, `max_new_tokens=128`) | 5.49% | 9 / 164 | 126 / 164 (76.8%) |
|
| 50 |
| GrimmCoder (Base Pretrain, Step 61,500) | `temperature=0.2`, `top_k=50`, `top_p=0.95`, `repetition_penalty=1.1` | 4.88% | 8 / 164 | 155 / 164 (94.5%) |
|
| 51 |
|
|
|
|
| 19 |
|
| 20 |
# GrimmCoder (PyEdu Finetuned)
|
| 21 |
|
| 22 |
+
**GrimmCoder_v2** is a ~107M-parameter LLaMA-style decoder-only transformer trained from scratch exclusively on Python source code for both **left-to-right completion** and **Fill-in-the-Middle (FIM)** code completion.
|
| 23 |
|
| 24 |
This release represents **Phase 2 finetuning** on `Avelina/python-edu-cleaned` (774.1M tokens, 6,000 steps with cosine decay `1e-4 → 1e-5`), initialized from the 8B-token `bigcode/starcoderdata` pretrain base checkpoint.
|
| 25 |
|
|
|
|
| 44 |
|
| 45 |
| Model Version | Decoding | `pass@1` | Solved | Syntax Valid |
|
| 46 |
|---|---|---|---|---|
|
| 47 |
+
| **GrimmCoder_v2** | **greedy (`do_sample=False`, `max_new_tokens=128`)** | **9.15%** | **15 / 164** | **137 / 164 (83.5%)** |
|
| 48 |
+
| **GrimmCoder_v2** | **`temperature=0.2`, `top_k=50`, `top_p=0.95`, `repetition_penalty=1.1`** | **9.15%** | **15 / 164** | **158 / 164 (96.3%)** |
|
| 49 |
| GrimmCoder (Base Pretrain, Step 61,500) | greedy (`do_sample=False`, `max_new_tokens=128`) | 5.49% | 9 / 164 | 126 / 164 (76.8%) |
|
| 50 |
| GrimmCoder (Base Pretrain, Step 61,500) | `temperature=0.2`, `top_k=50`, `top_p=0.95`, `repetition_penalty=1.1` | 4.88% | 8 / 164 | 155 / 164 (94.5%) |
|
| 51 |
|