Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set unique UNK token #435

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

set unique UNK token #435

wants to merge 1 commit into from

Conversation

Ssukriti
Copy link
Collaborator

@Ssukriti Ssukriti commented Jan 9, 2025

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

  • I have added >=1 unit test(s) for every new method I have added.
  • I have ensured all unit tests pass

Signed-off-by: Sukriti-Sharma4 <[email protected]>
@Ssukriti Ssukriti marked this pull request as draft January 9, 2025 04:20
Copy link

github-actions bot commented Jan 9, 2025

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant