Instructions to use hf-internal-testing/tiny-random-MT5EncoderModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-MT5EncoderModel with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-MT5EncoderModel") model = AutoModel.from_pretrained("hf-internal-testing/tiny-random-MT5EncoderModel", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from hf-internal-testing/tiny-random-MT5EncoderModel: direct link, hf CLI and curl.
- Browser
- Download file 828 Bytes
-
https://huggingface.co/hf-internal-testing/tiny-random-MT5EncoderModel/resolve/b3435bec8de1f7ac7a4ee92d1a983b49071bfd28/config.json
- Command line
-
hf download hf://hf-internal-testing/tiny-random-MT5EncoderModel@b3435bec8de1f7ac7a4ee92d1a983b49071bfd28/config.json
-
curl -L -o config.json https://huggingface.co/hf-internal-testing/tiny-random-MT5EncoderModel/resolve/b3435bec8de1f7ac7a4ee92d1a983b49071bfd28/config.json
828 Bytes
| { | |
| "_name_or_path": "tiny_models/mt5/MT5EncoderModel", | |
| "architectures": [ | |
| "MT5EncoderModel" | |
| ], | |
| "bos_token_id": 0, | |
| "classifier_dropout": 0.0, | |
| "d_ff": 37, | |
| "d_kv": 8, | |
| "d_model": 32, | |
| "decoder_start_token_id": 0, | |
| "dense_act_fn": "gelu_new", | |
| "dropout_rate": 0.1, | |
| "eos_token_id": 1, | |
| "feed_forward_proj": "gated-gelu", | |
| "initializer_factor": 0.002, | |
| "is_encoder_decoder": true, | |
| "is_gated_act": true, | |
| "layer_norm_epsilon": 1e-06, | |
| "model_type": "mt5", | |
| "num_decoder_layers": 2, | |
| "num_heads": 4, | |
| "num_layers": 2, | |
| "pad_token_id": 0, | |
| "relative_attention_max_distance": 128, | |
| "relative_attention_num_buckets": 8, | |
| "tie_word_embeddings": false, | |
| "tokenizer_class": "T5Tokenizer", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.38.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 250100 | |
| } | |