初始化项目,由ModelHub XC社区提供模型
Model: Garv98/GX-Coder-7B Source: Original Platform
This commit is contained in:
63
README.md
Normal file
63
README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
base_model: unsloth/Qwen2.5-Coder-7B-Instruct
|
||||
tags:
|
||||
- code
|
||||
- qlora
|
||||
- unsloth
|
||||
- qwen2.5-coder
|
||||
- text-generation
|
||||
language:
|
||||
- en
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# GX-Coder-7B
|
||||
|
||||
**v0.1** — QLoRA fine-tune of [`unsloth/Qwen2.5-Coder-7B-Instruct`](https://huggingface.co/Qwen2.5-Coder-7B-Instruct),
|
||||
built to power a multi-mode coding agent. This first release sits at **parity with
|
||||
the base** on HumanEval+ (see table); it's an end-to-end QLoRA→eval→ship baseline.
|
||||
Later versions target agent-specific tasks (tool-calling, web/UI codegen) where
|
||||
the base isn't already saturated.
|
||||
|
||||
## Summary
|
||||
|
||||
- **Base:** unsloth/Qwen2.5-Coder-7B-Instruct
|
||||
- **Method:** 4-bit QLoRA (LoRA r=16) via [Unsloth](https://github.com/unslothai/unsloth)
|
||||
- **Hardware:** single free-Colab T4 (16GB)
|
||||
- **Data:** open instruction-coding datasets, ChatML-formatted (see training repo)
|
||||
|
||||
## Benchmarks (HumanEval+ pass@1, greedy)
|
||||
|
||||
| Model | HumanEval+ pass@1 |
|
||||
|-------|-------------------|
|
||||
| unsloth/Qwen2.5-Coder-7B-Instruct (base) | 80.5 |
|
||||
| **GX-Coder-7B (this)** | **78.0** |
|
||||
|
||||
> Scored with [EvalPlus](https://github.com/evalplus/evalplus) (164 problems,
|
||||
> greedy). The ~2pt gap is within noise (~3-4 problems) — treat as parity. A
|
||||
> generic fine-tune can't easily beat a near-ceiling base here; gains come from
|
||||
> task-specific data in later versions.
|
||||
|
||||
## Intended use
|
||||
|
||||
Code generation, completion, review, and tool-using agent workflows. Powers the
|
||||
companion multi-mode coding agent (Claude-Code-like coder + Figma-like web/UI
|
||||
design mode).
|
||||
|
||||
## Limitations
|
||||
|
||||
Small model fine-tune — not frontier-level. May hallucinate APIs, miss edge
|
||||
cases, and produce insecure code. Always review generated code before running.
|
||||
Not trained on benchmark test sets (contamination guard in data_prep.py).
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
tok = AutoTokenizer.from_pretrained("Garv98/GX-Coder-7B")
|
||||
model = AutoModelForCausalLM.from_pretrained("Garv98/GX-Coder-7B", device_map="auto")
|
||||
msgs = [{"role": "user", "content": "Write a Python function to check if a string is a palindrome."}]
|
||||
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
||||
print(tok.decode(model.generate(ids, max_new_tokens=256)[0][ids.shape[1]:], skip_special_tokens=True))
|
||||
```
|
||||
Reference in New Issue
Block a user