|
I have done an experiment training the vitstr_base model for "polish" vocab. The training has been performed using the following command: I copied the checkpoint file for testing. Now I just like to use it for ocr for test purposes: reco_model = vitstr_base(pretrained=False, vocab="polish")
reco_model.from_pretrained(
f"{model_root_folder}FirstTrain.vl.0.0515268.pt",
map_location="cpu",
vocab="polish",
)I'm getting error message: Please advise what I'm doing wrong. |
Answered by
neojg
Sep 15, 2025
Replies: 1 comment
|
As expected the solution is trivial. The training script expects the name of the vocabulary e.g. "polish" The parameter vocab= expects not the name of the language but the actual string containing vocabulary. In my case VOCAB["polish"]. So the working code looks like: reco_model = vitstr_base(pretrained=False, vocab="polish")
reco_model.from_pretrained(
f"{model_root_folder}FirstTrain.vl.0.0515268.pt",
map_location="cpu",
vocab=VOCAB["polish"],
) |
0 replies
Answer selected by
neojg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As expected the solution is trivial.
The training script expects the name of the vocabulary e.g. "polish"
The parameter vocab= expects not the name of the language but the actual string containing vocabulary. In my case VOCAB["polish"].
So the working code looks like: