Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshitaB committed Apr 9, 2024
1 parent 893f8c0 commit ecfe090
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hf_olmo/convert_olmo_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ def download_remote_checkpoint_and_convert_to_hf(checkpoint_dir: str, local_dir:
convert_checkpoint(local_model_path)
return local_model_path


def fix_bad_tokenizer(checkpoint_dir: str):
path = os.path.join(checkpoint_dir, "config.yaml")
conf = om.load(path)
conf["tokenizer"]["identifier"] = "allenai/gpt-neox-olmo-dolma-v1_5"
conf["model"]["eos_token_id"] = 50279
om.save(conf, path)


def main():
parser = argparse.ArgumentParser(
description="Adds a config.json to the checkpoint directory, and creates pytorch_model.bin, "
Expand Down

0 comments on commit ecfe090

Please sign in to comment.