Skip to content

[Bug] ct2fast-nllb-200-3.3B not working #9

@songoten28

Description

@songoten28

Thank you for creating this amazing library.

But there is a small issue when I follow this link: https://huggingface.co/michaelfeil/ct2fast-nllb-200-3.3B

It gives me the following error:

File "/Users/testpython/venv/lib/python3.11/site-packages/hf_hub_ctranslate2/translate.py", line 126, in init
super().init(
File "/Users/testpython/venv/lib/python3.11/site-packages/hf_hub_ctranslate2/translate.py", line 48, in init
self.model = self.ctranslate_class(
^^^^^^^^^^^^^^^^^^^^^^

RuntimeError: Cannot load the target vocabulary from the model directory.

from hf_hub_ctranslate2 import TranslatorCT2fromHfHub

model = TranslatorCT2fromHfHub(
    # load in int8 on CUDA
    model_name_or_path="michaelfeil/ct2fast-nllb-200-3.3B",
    device="cpu",
    compute_type="int8",
    # tokenizer=AutoTokenizer.from_pretrained("{ORG}/{NAME}")
)
outputs = model.generate(
    text=["def fibonnaci(", "User: How are you doing? Bot:"],
    max_length=64,
)
print(outputs)

do I need any extra config?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions