mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
fix error from prepare call running twice in a row
This commit is contained in:
parent
7bf601107c
commit
5c49a0dcd0
@ -90,6 +90,7 @@ def do_train(loraName: str, microBatchSize: int, batchSize: int, epochs: int, le
|
|||||||
evalData = load_dataset("json", data_files=cleanPath('training/datasets', f'{evalDataset}.json'))
|
evalData = load_dataset("json", data_files=cleanPath('training/datasets', f'{evalDataset}.json'))
|
||||||
evalData = evalData['train'].shuffle().map(generate_and_tokenize_prompt)
|
evalData = evalData['train'].shuffle().map(generate_and_tokenize_prompt)
|
||||||
# Start prepping the model itself
|
# Start prepping the model itself
|
||||||
|
if not hasattr(model, 'lm_head') or hasattr(model.lm_head, 'weight'):
|
||||||
model = prepare_model_for_int8_training(model)
|
model = prepare_model_for_int8_training(model)
|
||||||
config = LoraConfig(
|
config = LoraConfig(
|
||||||
r=loraRank,
|
r=loraRank,
|
||||||
|
Loading…
Reference in New Issue
Block a user