Rename MODEL_CARD.md to kaggle_Details.md and add custom details
Browse files
MODEL_CARD.md → kaggle_Details.md
RENAMED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
# Model Summary
|
| 2 |
|
| 3 |
-
**CodeLens-Reviewer** is an AI agent fine-tuned to act as a Senior Code Reviewer. Built upon the Qwen2.5-Coder (7B) architecture, this model has been instruction-tuned to autonomously detect bugs, identify security vulnerabilities, and critique architectural flaws in Python Pull Requests. It interacts directly with the CodeLens Evaluation Environment, outputting perfectly structured JSON actions to simulate an automated code review loop.
|
| 4 |
|
| 5 |
## Usage
|
| 6 |
|
| 7 |
-
This model is intended to be used either standalone for code inference or plugged into the CodeLens Evaluation Environment.
|
| 8 |
|
| 9 |
### Inference with Unsloth
|
| 10 |
```python
|
| 11 |
from unsloth import FastLanguageModel
|
| 12 |
|
| 13 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 14 |
-
model_name = "ArshVerma/
|
| 15 |
max_seq_length = 2048,
|
| 16 |
load_in_4bit = True,
|
| 17 |
)
|
|
@@ -24,8 +24,7 @@ def process(data):
|
|
| 24 |
for i in data:
|
| 25 |
if i == "remove": data.remove(i)
|
| 26 |
return data
|
| 27 |
-
```
|
| 28 |
-
"""
|
| 29 |
|
| 30 |
messages = [
|
| 31 |
{"role": "system", "content": "You are an expert code reviewer. Output only valid JSON."},
|
|
@@ -38,14 +37,14 @@ print(tokenizer.batch_decode(outputs)[0])
|
|
| 38 |
```
|
| 39 |
|
| 40 |
**Shape of Inputs/Outputs:**
|
| 41 |
-
- **Input:** Natural language instructions and a python code snippet
|
| 42 |
- **Output:** A strict JSON object containing `action`, `issue_description`, `filename`, `line_number`, `severity`, and `category`.
|
| 43 |
|
| 44 |
**Known Failures:** The model may hallucinate specific line numbers if the provided code diff is extremely long or poorly formatted.
|
| 45 |
|
| 46 |
## System
|
| 47 |
|
| 48 |
-
This model serves as the core "Agent" in the **CodeLens Evaluation System**. It receives system prompts, noise budgets, and task definitions from the CodeLens Python backend. Its downstream dependency is the CodeLens WebSocket dashboard, which parses the JSON outputs to assign rewards (positive/negative) and update the live leaderboard.
|
| 49 |
|
| 50 |
## Implementation requirements
|
| 51 |
|
|
@@ -80,7 +79,7 @@ The model was trained on a highly specific, synthetically generated instructiona
|
|
| 80 |
|
| 81 |
## Training data
|
| 82 |
|
| 83 |
-
The training data (`
|
| 84 |
- A `pr_title` and `pr_description`.
|
| 85 |
- A code `diff` containing planted bugs, security flaws, or architectural issues.
|
| 86 |
- A golden `JSON` completion representing the ideal code review action.
|
|
|
|
| 1 |
# Model Summary
|
| 2 |
|
| 3 |
+
**CodeLens-Reviewer** is an AI agent fine-tuned to act as a Senior Code Reviewer. Built upon the `Qwen2.5-Coder (7B)` architecture, this model has been instruction-tuned by Arsh Verma to autonomously detect bugs, identify security vulnerabilities, and critique architectural flaws in Python Pull Requests. It interacts directly with the CodeLens Evaluation Environment, outputting perfectly structured JSON actions to simulate an automated code review loop.
|
| 4 |
|
| 5 |
## Usage
|
| 6 |
|
| 7 |
+
This model is intended to be used either standalone for code inference or plugged into the live CodeLens Evaluation Environment.
|
| 8 |
|
| 9 |
### Inference with Unsloth
|
| 10 |
```python
|
| 11 |
from unsloth import FastLanguageModel
|
| 12 |
|
| 13 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 14 |
+
model_name = "ArshVerma/CodeLens-Reviewer",
|
| 15 |
max_seq_length = 2048,
|
| 16 |
load_in_4bit = True,
|
| 17 |
)
|
|
|
|
| 24 |
for i in data:
|
| 25 |
if i == "remove": data.remove(i)
|
| 26 |
return data
|
| 27 |
+
```\n"""
|
|
|
|
| 28 |
|
| 29 |
messages = [
|
| 30 |
{"role": "system", "content": "You are an expert code reviewer. Output only valid JSON."},
|
|
|
|
| 37 |
```
|
| 38 |
|
| 39 |
**Shape of Inputs/Outputs:**
|
| 40 |
+
- **Input:** Natural language instructions and a python code snippet.
|
| 41 |
- **Output:** A strict JSON object containing `action`, `issue_description`, `filename`, `line_number`, `severity`, and `category`.
|
| 42 |
|
| 43 |
**Known Failures:** The model may hallucinate specific line numbers if the provided code diff is extremely long or poorly formatted.
|
| 44 |
|
| 45 |
## System
|
| 46 |
|
| 47 |
+
This model serves as the core "Agent" in the **CodeLens Evaluation System**. It receives system prompts, noise budgets, and task definitions from the CodeLens Python backend. Its downstream dependency is the CodeLens WebSocket dashboard (hosted on Hugging Face Spaces), which parses the JSON outputs to assign rewards (positive/negative) and update the live leaderboard.
|
| 48 |
|
| 49 |
## Implementation requirements
|
| 50 |
|
|
|
|
| 79 |
|
| 80 |
## Training data
|
| 81 |
|
| 82 |
+
The training data (`ArshVerma/CodeLens-Dataset`) contains custom prompt-completion pairs. Each row simulates a CodeLens environment state containing:
|
| 83 |
- A `pr_title` and `pr_description`.
|
| 84 |
- A code `diff` containing planted bugs, security flaws, or architectural issues.
|
| 85 |
- A golden `JSON` completion representing the ideal code review action.
|