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

Why always Downloading the tokenizer of seamlessM4T_v2_large #409

Open
Longleaves opened this issue Apr 9, 2024 · 7 comments
Open

Why always Downloading the tokenizer of seamlessM4T_v2_large #409

Longleaves opened this issue Apr 9, 2024 · 7 comments

Comments

@Longleaves
Copy link

I already set up CHECKPOINTS_PATH and cards, but why always Downloading the tokenizer of seamlessM4T_v2_large when I python app.py? Please help, thanks.
图片
图片
图片

@zrthxn
Copy link
Contributor

zrthxn commented Apr 14, 2024

If I understand correctly, it looks like you're using snapshot_download.
If you just load the model or tokenizer directly, the cached files will be used once downloaded.

from seamless_communication.models.unity import (
    load_unity_model,
    load_unity_text_tokenizer,
    load_unity_unit_tokenizer
)

model = load_unity_model(model_name_or_card)
tokenizer = load_unity_unit_tokenizer(model_name_or_card)
tokenizer = load_unity_text_tokenizer(model_name_or_card)

Here model_name_or_card = "seamlessM4T_v2_large"

@amirmfarzane
Copy link

If I understand correctly, it looks like you're using snapshot_download. If you just load the model or tokenizer directly, the cached files will be used once downloaded.

from seamless_communication.models.unity import (
    load_unity_model,
    load_unity_text_tokenizer,
    load_unity_unit_tokenizer
)

model = load_unity_model(model_name_or_card)
tokenizer = load_unity_unit_tokenizer(model_name_or_card)
tokenizer = load_unity_text_tokenizer(model_name_or_card)

Here model_name_or_card = "seamlessM4T_v2_large"

How load checkpoints that i got from fine-tuning.

@avidale
Copy link
Contributor

avidale commented Jun 24, 2024

How load checkpoints that i got from fine-tuning.

You can start by loading the original model (e.g. seamlessM4T_v2_large) from its card, and then use the function load_checkpoint (src/seamless_communication/cli/m4t/evaluate/evaluate.py#L365) to update the model from your fine-tuned checkpoint.

Also, please take a look at the excellent note from Alisamar Husain about fine-tuning M4T models.

@amirmfarzane
Copy link

amirmfarzane commented Jul 8, 2024

How load checkpoints that i got from fine-tuning.

You can start by loading the original model (e.g. seamlessM4T_v2_large) from its card, and then use the function load_checkpoint (src/seamless_communication/cli/m4t/evaluate/evaluate.py#L365) to update the model from your fine-tuned checkpoint.

Also, please take a look at the excellent note from Alisamar Husain about fine-tuning M4T models.

Thank you very much.

@RRThivyan
Copy link

Hi, I have finetuned the model using the notes from Alisamar, but the model is not able to be loaded, as its throwing error that some weights are missing. final_proj.weights missing. I modified the seamlessm4t_v2_large.yaml to my model checkpoint, but getting this error. does finetune models have different weights compared to original model?

@amirmfarzane
Copy link

Hi, I have finetuned the model using the notes from Alisamar, but the model is not able to be loaded, as its throwing error that some weights are missing. final_proj.weights missing. I modified the seamlessm4t_v2_large.yaml to my model checkpoint, but getting this error. does finetune models have different weights compared to original model?

If you're having trouble loading checkpoints saved after fine-tuning, you can use the load_checkpoint function in the mini-evaluation section of this notebook.

@RRThivyan
Copy link

RRThivyan commented Sep 23, 2024

Hi, I followed the steps you mentioned. But as I said, its throwing error at final_proj.weight. This is my query. does the finetuned model weights differ from original model? If so how can we use our finetuned model?

m4t_evaluate
--model_name seamlessM4T_large
--task ASR
--tgt_lang eng
--data_file /home/jupyter/myfiles/fleurs/test/test_manifest.json
--output_path eval
--n_samples 2000

image

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

No branches or pull requests

5 participants