Skip to content

feat: Conversion example#118

Merged
chichun-charlie-liu merged 9 commits intofoundation-model-stack:mainfrom
andrea-fasoli:conversion_example
May 23, 2025
Merged

feat: Conversion example#118
chichun-charlie-liu merged 9 commits intofoundation-model-stack:mainfrom
andrea-fasoli:conversion_example

Conversation

@andrea-fasoli
Copy link
Copy Markdown
Collaborator

Description of the change

Add example of converting and saving the checkpoint of RoBERTa INT8 model after DQ.
In addition, as part of this PR:

  • support is added for RoBERTa architecture to run DQ with smoothquant, by initializing smoothq_scale_layers and other quantization parameters
  • 3 training arguments are added: save_ckpt, save_ckpt_for_aiu, and recompute_narrow_weights
  • smoothquant selection is modified from being always enabled in DQ (qcfg["smoothq"]=True) to depend on smoothq_alpha selection >= 0, such that passing smoothq_alpha = -1 now disables smoothquant

Related issue number

Closes #116

Was the PR tested

  • I have ensured all unit tests pass

Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
@andrea-fasoli
Copy link
Copy Markdown
Collaborator Author

welcoming feedback and improvements to the new conversion example
@IqbalSaraf

Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Comment thread examples/AIU_CONVERSION/README.md Outdated
Signed-off-by: Brandon Groth <brandon.m.groth@gmail.com>
@chichun-charlie-liu chichun-charlie-liu merged commit 418f682 into foundation-model-stack:main May 23, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

example of checkpoint conversion for AIU

3 participants