--- base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 library_name: peft pipeline_tag: text-generation tags: - base_model:adapter:TinyLlama/TinyLlama-1.1B-Chat-v1.0 - lora - transformers license: apache-2.0 datasets: - LL-Square/CodeForge-TinyLlama1.1B-Instruct language: - en --- # CodeForge-Instruct Lightweight repository for preparing, training, and uploading small instruct-style models and LoRA adapters. This project contains simple scripts to train a model (`train.py`), run inference (`main.py`), configure logging (`logging_setup.py`), and upload artifacts (`upload.py`). A small sample dataset is included as `sample.jsonl`. ## Data format The dataset expects newline-delimited JSON (`.jsonl`) where each line is an object with at least `prompt` and `response` (or `instruction`/`output`) fields. Example (`sample.jsonl`): ```jsonl {"prompt": "Summarize the following text:", "response": "A short summary."} ``` Adjust `train.py` to match your field names if needed. ## Usage Training (example): ```bash python train.py --data sample.jsonl --output-dir ./checkpoints --epochs 3 --batch-size 8 ``` Run inference/demo: ```bash python main.py --model ./checkpoints/latest ``` Upload artifacts (example): ```bash python upload.py --model ./checkpoints/latest --dest hub-or-bucket ``` See individual scripts for additional flags and configuration. ## Logging The repository centralizes logging in `logging_setup.py`; import and call `setup_logging()` from other scripts to get consistent formatting and levels. ## Development - Run linters/formatters as you prefer (e.g. `black`, `ruff`). - Add tests under a `tests/` folder if you expand behavior. ## Contributing Open issues or PRs with clear reproduction steps. Keep changes minimal and scoped. ## License This repository does not include a license file. Add a `LICENSE` if you plan to publish. ### Framework versions - PEFT 0.18.1 - --- If you'd like, I can: - add a `requirements.txt` with pinned versions, - add CLI argument parsing examples to `train.py` and `main.py`, or - create a short CONTRIBUTING guide.