diff --git a/lora/lora.py b/lora/lora.py index 723e783d..6f91ccca 100644 --- a/lora/lora.py +++ b/lora/lora.py @@ -3,6 +3,7 @@ import argparse import json import math +import sys import time from pathlib import Path @@ -14,6 +15,9 @@ import utils as lora_utils from mlx.utils import tree_flatten from models import LoRALinear +# Disable output buffering to see print statements in real-time +sys.stdout.reconfigure(line_buffering=True) + def build_parser(): parser = argparse.ArgumentParser(description="LoRA or QLoRA finetuning.")