LL-Square/CodeForge-TinyLlama1.1B-Instruct
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):
{"prompt": "Summarize the following text:", "response": "A short summary."}Adjust train.py to match your field names if needed.
Usage
Training (example):
python train.py --data sample.jsonl --output-dir ./checkpoints --epochs 3 --batch-size 8Run inference/demo:
python main.py --model ./checkpoints/latestUpload artifacts (example):
python upload.py --model ./checkpoints/latest --dest hub-or-bucketSee 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.txtwith pinned versions, - add CLI argument parsing examples to
train.pyandmain.py, or - create a short CONTRIBUTING guide.
