Skip to content

Comments

Issue #26 - Fix inference paths, add requirements.txt, and update README#27

Open
GVN2307 wants to merge 1 commit intoAshChadha-iitg:mainfrom
GVN2307:fix/inference-and-docs
Open

Issue #26 - Fix inference paths, add requirements.txt, and update README#27
GVN2307 wants to merge 1 commit intoAshChadha-iitg:mainfrom
GVN2307:fix/inference-and-docs

Conversation

@GVN2307
Copy link

@GVN2307 GVN2307 commented Feb 12, 2026

This PR addresses several issues identified during a code audit that prevented the repository from being easily reproducible and functional. It fixes broken file paths in the inference script, adds missing dependency definitions, and improves the overall codebase robustness.

Changes

  1. Fix inference.py Paths & Robustness
  • Path Correction: Updated ADAPTER_PATH to point to the root directory where adapter_config.json and adapter_model.safetensors are actually located.
  • Modularization: Refactored the inference logic into a reusable solve_problem() function.
  • Safety Checks: Added a CUDA availability check and explicit error handling for model/adapter loading to help users troubleshooting on different hardware.
  1. Dependency Management
  • Added requirements.txt : Defined all necessary libraries including transformers, peft, bitsandbytes, accelerate, and safetensors. This allows for a single-command setup: pip install -r requirements.txt.
  1. Documentation Updates
  • Installation Guide: Added clear step-by-step instructions to the README.md for cloning the repo and installing dependencies. Usage Examples: Added examples on how to run the inference.py script and how to import the new solve_problem function into other Python projects.

4.Verification Results
Verified that the directory structure now matches the hardcoded paths in the script.
Confirmed requirements.txt includes the required versioning hooks for bitsandbytes 4-bit quantization.Ensured the script gracefully exits with a helpful message if the model adapter cannot be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant