-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
The model.save_pretrained_gguf() function wont run in .venv environment the only thing that solved the issue was changing enviroments to conda
Saving a model in .venv using said function will throw this error -> Unsloth: The file ('llama.cpp/llama-quantize' or 'llama.cpp/llama-quantize.exe' if you are on Windows WSL) or 'llama.cpp/quantize' does not exist.
But we expect this file to exist! Maybe the llama.cpp developers changed the name or check extension of the llama-quantize file.
But the same code with same setup will run perfectly in conda
Is that a feature or a bug?
-
Dataset Details:
- Dataset: amarmahdi1112/human_chat_dataset_processed
- Formating Function:
def format_instruction(sample):
return {
"text": tokenizer.apply_chat_template(
[
{"role": "user", "content": sample["instruction"]},
{"role": "assistant", "content": sample["output"]},
],
tokenize=False,
add_generation_prompt=False
)
}
-
Model Details:
Model didn't affect the result -
Training Config:
trainer = SFTTrainer(
model = model,
tokenizer = tokenizer,
train_dataset = dataset,
dataset_text_field = "text",
dataset_num_proc = 2,
max_seq_length = 2048,
packing = False,
args = TrainingArguments(
per_device_train_batch_size = 2,
gradient_accumulation_steps = 4,
warmup_steps = 5,
max_steps = 60,
learning_rate = 2e-4,
fp16 = not is_bfloat16_supported(),
bf16 = is_bfloat16_supported(),
logging_steps = 1,
optim = "adamw_8bit",
weight_decay = 0.01,
lr_scheduler_type = "linear",
seed = 3407,
output_dir = "outputs",
report_to = "none",
),
) -
Reproduction Steps:
setup a .venv environment
set a model you wish to fine tune, a tokenizer and the dataset
set parameters for your -
Expected Behavior:
It should run regardless of the environment, right? -
Actual Behavior:
No it does not