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

Add conversion script to HF #57

Open
wants to merge 2 commits into
base: magma
Choose a base branch
from

Conversation

JACKHAHA363
Copy link

@JACKHAHA363 JACKHAHA363 commented Oct 16, 2023

Requirement

Use the transformer version from https://github.com/JACKHAHA363/transformers/tree/robin_v4.32.1. This is based on the version 4.32.1 and it adds a Robin class here.

Usage

python tools/convert_module_to_hf.py \
    --input_dir checkpoints/robin_ckpt \
    --config_file checkpoints/robin_ckpt/configs/big_run_grid_8e-5_2208.yml \
    checkpoints/robin_ckpt/configs/magma_pythia_410M.yml \
    --output_dir checkpoints/robin_hf

Test

See python test_hf_robin.py for a sample inference
In the --config_file you can input a list of config file names.

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.

None yet

1 participant