Instructions to use mduraidi/locfix-e4b-runs_p with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mduraidi/locfix-e4b-runs_p with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mduraidi/locfix-e4b-runs_p")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mduraidi/locfix-e4b-runs_p", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mduraidi/locfix-e4b-runs_p with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mduraidi/locfix-e4b-runs_p" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mduraidi/locfix-e4b-runs_p", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mduraidi/locfix-e4b-runs_p
- SGLang
How to use mduraidi/locfix-e4b-runs_p with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mduraidi/locfix-e4b-runs_p" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mduraidi/locfix-e4b-runs_p", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mduraidi/locfix-e4b-runs_p" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mduraidi/locfix-e4b-runs_p", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mduraidi/locfix-e4b-runs_p with Docker Model Runner:
docker model run hf.co/mduraidi/locfix-e4b-runs_p
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.