Create README.MD
Browse files
README.MD
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3-Coder-1.5B
|
| 4 |
+
tags:
|
| 5 |
+
- causal-lm
|
| 6 |
+
- qwen
|
| 7 |
+
- qwen3
|
| 8 |
+
- code
|
| 9 |
+
- coder
|
| 10 |
+
- lora-merged
|
| 11 |
+
- code-analysis
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Code_analyze_1.0
|
| 16 |
+
|
| 17 |
+
**Code_analyze_1.0** is a merged LoRA fine-tuned version of **Qwen3-Coder-1.5B**, optimized for
|
| 18 |
+
code analysis, code understanding, and reasoning over source code.
|
| 19 |
+
|
| 20 |
+
## Model Details
|
| 21 |
+
|
| 22 |
+
- **Base model:** Qwen/Qwen3-Coder-1.5B
|
| 23 |
+
- **Model type:** Causal Language Model
|
| 24 |
+
- **Fine-tuning method:** LoRA (merged into base weights)
|
| 25 |
+
- **Languages:** Primarily English (code-focused), supports multilingual comments
|
| 26 |
+
- **Domain:** Programming / Software Engineering
|
| 27 |
+
|
| 28 |
+
This model is **fully merged and standalone** — no additional LoRA adapters or base model
|
| 29 |
+
dependencies are required at inference time.
|
| 30 |
+
|
| 31 |
+
## Intended Use
|
| 32 |
+
|
| 33 |
+
The model is designed for:
|
| 34 |
+
- Static code analysis
|
| 35 |
+
- Bug detection and explanation
|
| 36 |
+
- Code review and refactoring suggestions
|
| 37 |
+
- Understanding unfamiliar codebases
|
| 38 |
+
- Explaining algorithms and logic in source code
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
```python
|
| 43 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 44 |
+
|
| 45 |
+
model_id = "Vilyam888/Code_analyze_1.0"
|
| 46 |
+
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 48 |
+
model_id,
|
| 49 |
+
trust_remote_code=True
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 53 |
+
model_id,
|
| 54 |
+
trust_remote_code=True,
|
| 55 |
+
device_map="auto"
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
prompt = "Analyze this Python function and find potential issues:\n\n```python\ndef f(x): return x + 1\n```"
|
| 59 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 60 |
+
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 61 |
+
|
| 62 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|