Run this model with HF Jobs
Run google/switch-base-32 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/google/switch-base-32. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/google/switch-base-32 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use google/switch-base-32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/switch-base-32 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("google/switch-base-32") model = AutoModelForSeq2SeqLM.from_pretrained("google/switch-base-32", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Why the Decoder_start_token_id has to be defined in "google/switch-base-32" or "google/switch-base-64" ??
I was trying the official notebook ( https://colab.research.google.com/drive/1aGGVHZmtKmcNBbAwa9hbu58DDpIuB5O4?usp=sharing ) for the MoE Switch transformer but with "base-32".
ValueError: self.model.config.decoder_start_token_id has to be defined. In SwitchTransformers it is usually set to the pad_token_id.
However i don't face this problem with "base-8" or "base-16".
Thanks for the report. This is a bug as the decoder_start_token_id has been forgotten for this model. This should be now fixed: https://huggingface.co/google/switch-base-32/blob/main/config.json#L19
Thanks for your quick response. π
