mduraidi
/

LocFix-E4B

LocFix-E4B is a family of specialized Gemma 4 E4B models designed for repository-level software engineering tasks, particularly code localization and automated program repair.

The project explores a multi-stage approach to software issue resolution, using specialized models for agent-based reasoning, code localization, and code modification.

Model Variants

This repository contains three model configurations:

Model Description
S1-e4b Agent-oriented model for software engineering workflows.
S2a-e4b Specialized localization and code-fixing models.
S2a-view-e4b Alternative localization model trained on view-oriented examples.

S1-e4b: Agent

An agent-oriented model designed to understand software engineering tasks and support repository-aware workflows.

Its intended role is to reason about software issues and interact with repository-level context.

S2a-e4b: Localization and Fixing

This configuration includes two specialized components:

  • Localizer: Identifies relevant files, functions, and code regions associated with a software issue.
  • Fixer: Generates code modifications intended to address the identified issue.

The configuration follows a localization-then-repair approach.

S2a-view-e4b: View-Oriented Localization

An alternative localization model trained using view-oriented examples.

It provides another approach to identifying relevant code locations, alongside the edit-oriented localization configuration.

The performance differences between the localization variants require empirical evaluation.

Intended Use

LocFix-E4B is intended for research and development involving:

  • Automated bug localization.
  • Repository-level code understanding.
  • Identification of relevant source files and functions.
  • Automated program repair.
  • Issue-driven code modification.
  • Repository-aware coding agents.
  • Multi-stage software engineering pipelines.

Workflow

The model family is designed around the following conceptual workflow:

          Software Issue
                 |
                 v
         Repository Context
                 |
                 v
          S1-e4b Agent
                 |
                 v
         Code Localization
                 |
                 v
       S2a-e4b Localizer
                 |
                 v
        Relevant Code Areas
                 |
                 v
         S2a-e4b Fixer
                 |
                 v
        Proposed Code Changes
                 |
                 v
        Testing and Validation

This represents the intended workflow inferred from the training configurations, not a guaranteed built-in inference pipeline.

Base Model and Training

The models are based on Google's Gemma 4 E4B instruction-tuned architecture.

The available training configurations indicate the following setup:

Parameter Value
Base model Gemma 4 E4B IT
Fine-tuning method LoRA
LoRA rank 64
LoRA alpha 32
Training epochs 3
Maximum sequence length 32,768
Learning rate 0.0002
Framework Transformers / PEFT

Training Datasets

The training configurations reference the following datasets:

Dataset Purpose
s1_agent.jsonl Agent training
s2_loc_edit.jsonl Edit-oriented localization
s2_loc_view.jsonl View-oriented localization
s2_fix_gold.jsonl Code-fixing training

These names reflect the available training configuration artifacts.

Evaluation

Recommended evaluation metrics include:

  • File-level localization accuracy.
  • Function-level localization accuracy.
  • Line-level localization accuracy.
  • Recall@1 and Recall@5.
  • Top-K localization accuracy.
  • Patch generation success rate.
  • Test pass rate after applying generated patches.
  • Repository-level issue resolution rate.

No quantitative benchmark results are claimed in this model card.

Limitations

  • Accurate localization does not guarantee a correct code repair.
  • Performance depends on the quality of repository context and issue descriptions.
  • Generated patches should be validated through automated tests and code review.
  • The relative performance of the localization variants has not been established here.
  • The training configurations do not establish generalization across all programming languages and repository types.
  • The checkpoints should not be assumed to constitute a standalone autonomous coding application.

Intended Audience

LocFix-E4B is intended primarily for:

  • Software engineering researchers.
  • Automated program repair researchers.
  • Developers building repository-aware coding agents.
  • Researchers studying code localization and multi-stage repair systems.

License

The repository metadata currently specifies other. Please consult the applicable base-model and training-data licenses before using or redistributing these weights.

Acknowledgements

Built upon the Gemma model family and the Hugging Face Transformers and PEFT ecosystems.

Citation

@misc{locfix_e4b,
  title  = {LocFix-E4B: Specialized Models for Code Localization and Automated Repair},
  author = {Hennara},
  year   = {2026},
  url    = {https://huggingface.co/Hennara/locfix-e4b-runs_p}
}

Note: This model card describes intended functionality inferred from the available training configurations and repository artifacts. Actual capabilities and performance should be established through reproducible evaluation.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support