Add id2label and label2id to config file; remove reference_compile
#8
by
tomaarsen
HF Staff
- opened
Hello!
Pull Request overview
- Add id2label and label2id to config file
- Remove remove reference_compile from the config file
Details
The id2label/label2id addition removes the need to specify this manually when initializing the model, so you can just use:
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("NousResearch/Minos-v1")
model = AutoModelForSequenceClassification.from_pretrained("NousResearch/Minos-v1")
Beyond that, the reference_compile
is a parameter that should be set automatically based on the user's environment. For example, compilation should only be enabled on CUDA, and only if triton etc. are installed.
See https://github.com/huggingface/transformers/pull/36305 for more details. In short: reference_compile
isn't saved anymore since v4.51.0.
- Tom Aarsen
tomaarsen
changed pull request status to
open