SoyGema / The-Lord-of-The-Words-The-two-frameworks

Translation exploration with Transformers and Machine Learning Experimentation Platfroms
MIT License
7 stars 0 forks source link

[HUB and local] Performing inference translation #9

Open SoyGema opened 11 months ago

SoyGema commented 11 months ago

Context:

Model uploaded to the Hub . Task was first recognized as Text generation, but was changed to Translation following recommendations from #6 . The challenge seems to be now related with the model, as it doesn´t make inference in local .

Tried :

The inference model returns an empty string in both the Hub and when running inference.py

python inference.py --model_name="SoyGema/english-hebrew" --input_text="Hello, my name is Sara"
Downloading (…)lve/main/config.json: 100%|█████████████████████████| 1.67k/1.67k [00:00<00:00, 3.64MB/s]
Downloading model.safetensors: 100%|█████████████████████████████████| 242M/242M [00:07<00:00, 31.4MB/s]
Downloading (…)neration_config.json: 100%|██████████████████████████████| 117/117 [00:00<00:00, 422kB/s]
Downloading (…)okenizer_config.json: 100%|█████████████████████████| 2.32k/2.32k [00:00<00:00, 6.87MB/s]
Downloading spiece.model: 100%|██████████████████████████████████████| 792k/792k [00:00<00:00, 2.08MB/s]
Downloading (…)/main/tokenizer.json: 100%|█████████████████████████| 2.42M/2.42M [00:00<00:00, 3.93MB/s]
Downloading (…)cial_tokens_map.json: 100%|█████████████████████████| 2.20k/2.20k [00:00<00:00, 7.49MB/s]
/Users/gema/Documents/The-Lord-of-The-Words-The-two-frameworks/.torchenv/lib/python3.10/site-packages/transformers/pipelines/__init__.py:1003: UserWarning: "translation" task was used, instead of "translation_XX_to_YY", defaulting to "translation_en_to_de"
  warnings.warn(
Translated text: ,   .
SoyGema commented 11 months ago

Looking at the source code trace, it seems to be related to the config.json file