Image-to-Text
Transformers
Safetensors
molparser_vision_encoder_decoder
image-text-to-text
chemistry
custom_code
Instructions to use UniParser/MolParser-Mobile with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UniParser/MolParser-Mobile with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="UniParser/MolParser-Mobile", trust_remote_code=True)# Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("UniParser/MolParser-Mobile", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "MolParserVisionEncoderDecoderModel" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "modeling_molparser_mobile.MolParserVisionEncoderDecoderConfig", | |
| "AutoModelForImageTextToText": "modeling_molparser_mobile.MolParserVisionEncoderDecoderModel" | |
| }, | |
| "decoder": { | |
| "_name_or_path": "", | |
| "activation_dropout": 0.0, | |
| "activation_function": "gelu", | |
| "add_cross_attention": true, | |
| "architectures": null, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "chunk_size_feed_forward": 0, | |
| "classifier_dropout": 0.0, | |
| "d_model": 192, | |
| "decoder_attention_heads": 4, | |
| "decoder_ffn_dim": 768, | |
| "decoder_layerdrop": 0.0, | |
| "decoder_layers": 6, | |
| "decoder_start_token_id": 2, | |
| "dropout": 0.1, | |
| "dtype": "float16", | |
| "encoder_attention_heads": 4, | |
| "encoder_ffn_dim": 768, | |
| "encoder_hidden_size": 192, | |
| "encoder_layerdrop": 0.0, | |
| "encoder_layers": 0, | |
| "eos_token_id": 2, | |
| "forced_eos_token_id": 2, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1", | |
| "2": "LABEL_2" | |
| }, | |
| "init_std": 0.02, | |
| "is_decoder": true, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1, | |
| "LABEL_2": 2 | |
| }, | |
| "max_position_embeddings": 1024, | |
| "model_type": "bart", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": 1, | |
| "problem_type": null, | |
| "return_dict": true, | |
| "scale_embedding": false, | |
| "tie_word_embeddings": true, | |
| "use_cache": true, | |
| "vocab_size": 385 | |
| }, | |
| "decoder_start_token_id": 0, | |
| "dtype": "float16", | |
| "encoder": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "auto_map": { | |
| "AutoConfig": "modeling_molparser_mobile.CustomEncoderConfig", | |
| "AutoModel": "modeling_molparser_mobile.CustomTimmEncoder" | |
| }, | |
| "chunk_size_feed_forward": 0, | |
| "dtype": "float16", | |
| "hidden_size": 192, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "initializer_range": 0.02, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_input_size": 224, | |
| "model_type": "custom_timm_encoder", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pixel_unshuffle": 1, | |
| "problem_type": null, | |
| "return_dict": true, | |
| "timm_model_name": "vit_tiny_r_s16_p8_224.augreg_in21k_ft_in1k", | |
| "timm_output_dim": 192, | |
| "timm_pretrained": false | |
| }, | |
| "is_encoder_decoder": true, | |
| "model_type": "molparser_vision_encoder_decoder", | |
| "pad_token_id": 1, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.4.0", | |
| "use_cache": true, | |
| "vocab_size": 385, | |
| "model_name": "MolParser Mobile", | |
| "torch_dtype": "float16" | |
| } | |