Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
Granite models have UNK = EOS , this is resulting in poor quality when tuning for some datasets. When it is set to unique, the quality improves.
Related issue number
https://github.ibm.com/ai-foundation/watson-fm-stack-tracker/issues/1435
How to verify the PR
Tested with tone dataset
/home/tuning/.local/bin/accelerate launch --num_processes=2 --config_file /app/accelerate_fsdp_defaults.yaml -m tuning.sft_trainer --model_name_or_path $MODEL_PATH --training_data_path $TRAIN_DATA_PATH --torch_dtype bfloat16 --output_dir $OUTPUT_PATH --num_train_epochs 5 --per_device_train_batch_size 4 --gradient_accumulation_steps 4 --learning_rate 1e-5 --response_template "\n### Response:" --dataset_text_field "output"
export MODEL_PATH="ibm-granite/granite-3.0-8b-base"
export TRAIN_DATA_PATH="/testing/tuning/input/cc_tone_sft_format_1000_train.json"
at inference we get repeated output without the change , and proper output after change
Was the PR tested