https://github.com/ahmedhus22/llm4lint
A Static Analysis Tool using LLMs
https://github.com/ahmedhus22/llm4lint
deep-learning llm python-linter qwen2 unsloth
Last synced: about 2 months ago
JSON representation
A Static Analysis Tool using LLMs
- Host: GitHub
- URL: https://github.com/ahmedhus22/llm4lint
- Owner: ahmedhus22
- License: mit
- Created: 2024-11-16T11:40:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-12T16:58:12.000Z (11 months ago)
- Last Synced: 2025-09-28T11:25:30.095Z (5 months ago)
- Topics: deep-learning, llm, python-linter, qwen2, unsloth
- Language: Python
- Homepage:
- Size: 299 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LLM4LINT
A Static Analysis Tool built by finetuning Qwen2.5 Coder using unsloth.
## Features:
- Linting of Python source code in traditional linting format and an interactive mode.
- You can also provide your own data to create a different model (use train.py script):
- Specify your own examples in a csv file with input and output columns.
output should be ` - : `. With just 1 example multiple datapoints are created using augmentation.
- Augmentation of inputs:
- Variable names are replaced with different names to make sure model does not memorize the code.
- Additional code is added before and after your input example. (outputs are also adjusted to account for lineno changes).
- Dataset created using this script: https://huggingface.co/datasets/ahmedhus22/python-static-analysis-linting
## Usage:
llm4lint [-h] [-i] filename
- positional arguments:
filename Python Source File to lint
- options:
- -h, --help show this help message and exit
- -i, --interactive starts chat interface for interacting with model
## Installation (For Inference Only)
```
pip install llm4lint
```
- Download the fine-tuned model from [Hugging Face](https://huggingface.co/ahmedhus22/llm4lint-7B-Qwen2.5Coder/tree/main) .gguf and Modelfile
- Create ollama Model
```
`ollama create llm4lint7b -f `
```
Now, You can access the linter anywhere in terminal using
```
llm4lint [options]
```