How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
Use Docker
docker model run hf.co/lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring:Q4_K_M
Quick Links

Qwen2.5-7B-Instruct Fine-Tuned for Java Code Refactoring

Overview

This model is a fine-tuned version of Qwen2.5-7B-Instruct specialized for Java code refactoring using the InstructLab framework.

The training dataset was generated using the Skills pipeline of InstructLab, with GPT-4o acting as the teacher model to generate instruction-response pairs. A total of 1,440 synthetic training instances were used for fine-tuning.

Base Model

  • Qwen/Qwen2.5-7B-Instruct

Training

The dataset was generated using:

ilab data generate \
  --model "openai/gpt-4o" \
  --endpoint-url "http://localhost:8000/v1" \
  --api-key "$ILAB_API_KEY" \
  --pipeline simple

The model was fine-tuned using:

ilab model train \
  --model-path Qwen/Qwen2.5-7B-Instruct \
  --num-epochs 3 \
  --device cpu \
  --max-seq-len 2048 \
  --max-batch-len 10000 \
  --effective-batch-size 128 \
  --lora-rank 32 \
  --lora-alpha 64 \
  --lora-dropout 0.1 \
  --learning-rate 1e-4 \
  --is-padding-free false

Intended Use

This model is intended for Java code refactoring tasks. It is designed to generate refactored Java code while preserving the original program behavior.

Training Data

  • Framework: InstructLab
  • Pipeline: Skills
  • Teacher model: GPT-4o
  • Number of training instances: 1,440

License

This model is released under the Apache 2.0 license, consistent with the license of the base model.

Downloads last month
87
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for lucas-sousa-pereira/qwen2.5-7b-java-code-refactoring

Base model

Qwen/Qwen2.5-7B
Adapter
(2401)
this model