nethunter2023 commited on
Commit
083dd6f
·
verified ·
1 Parent(s): 91388be

results, no methodology

Browse files
Files changed (1) hide show
  1. README.md +26 -1
README.md CHANGED
@@ -14,6 +14,12 @@ pipeline_tag: text-generation
14
 
15
  A 1.5B code model for writing **C in Linux kernel style**, and Python.
16
 
 
 
 
 
 
 
17
  ```python
18
  from transformers import AutoModelForCausalLM, AutoTokenizer
19
 
@@ -33,6 +39,25 @@ print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
33
  ```
34
 
35
  Chat template ships with the tokenizer. Greedy decoding; the answer is the last
36
- fenced code block in the response.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  Base model: [`Qwen/Qwen2.5-Coder-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)
 
14
 
15
  A 1.5B code model for writing **C in Linux kernel style**, and Python.
16
 
17
+ Given a description and a signature it produces kernel C following the
18
+ conventions enforced in kernel review: tab indentation, brace placement,
19
+ declarations before statements, `-ERRNO` returns, and `goto` label unwinding.
20
+
21
+ ## Usage
22
+
23
  ```python
24
  from transformers import AutoModelForCausalLM, AutoTokenizer
25
 
 
39
  ```
40
 
41
  Chat template ships with the tokenizer. Greedy decoding; the answer is the last
42
+ fenced code block.
43
+
44
+ ## Results
45
+
46
+ Kernel C style, measured with the kernel's own `checkpatch.pl` on 40 held-out
47
+ tasks. `reference` is the kernel's own implementation of the same functions.
48
+
49
+ | | base | this model | reference |
50
+ |---|---|---|---|
51
+ | checkpatch defects / line ↓ | 0.872 | **0.020** | 0.017 |
52
+ | checkpatch errors, mean ↓ | 5.58 | **0.00** | 0.00 |
53
+ | style score ↑ | 0.211 | **0.968** | 0.977 |
54
+
55
+ Python, MBPP test (200 problems):
56
+
57
+ | | base | this model |
58
+ |---|---|---|
59
+ | pass@1 | 0.420 | 0.420 |
60
+
61
+ The kernel-side gains are stylistic; Python correctness is unchanged from base.
62
 
63
  Base model: [`Qwen/Qwen2.5-Coder-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)