poetry installRuff is configured in pyproject.toml with rules: E, W, F, I, C, B (ignoring E501, B008, C901).
poetry run ruff check .
poetry run ruff check --fix .poetry run pytestNote: test coverage is configured in tox.ini but currently commented out.
cd training/lora_instruct
python finetune.py --base_model 'togethercomputer/RedPajama-INCITE-Base-7B-v0.1' --output_dir './lora-redpajama'All training hyperparameters are CLI flags — see train() function signature in training/lora_instruct/finetune.py for the full list.
cd training/lora_instruct
export WORLD_SIZE=2
export CUDA_VISIBLE_DEVICES=0,1
torchrun --nproc_per_node=2 --master_port=1234 finetune.py \
--base_model 'togethercomputer/RedPajama-INCITE-Base-7B-v0.1' \
--output_dir './lora-redpajama'cd training/lora_instruct/inference
python bench.py --api-url https://api.openai.com/v1/chat/completions --model gpt-3.5-turboRequires OPENAI_API_KEY in environment or .env file.
- Python 3.10+
- Type hints on function signatures
- Dataclasses for structured configs (see
TrainConfig) python-firefor CLI interfacespython-dotenvfor environment variable loading