Instructions to use linktimecloud/my_awesome_model_classification_w_adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use linktimecloud/my_awesome_model_classification_w_adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="linktimecloud/my_awesome_model_classification_w_adapter")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("linktimecloud/my_awesome_model_classification_w_adapter") model = AutoModelForSequenceClassification.from_pretrained("linktimecloud/my_awesome_model_classification_w_adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from linktimecloud/my_awesome_model_classification_w_adapter: direct link, hf CLI and curl.
- Browser
- Download file 2.01 kB
-
https://huggingface.co/linktimecloud/my_awesome_model_classification_w_adapter/resolve/main/config.json
- Command line
-
hf download hf://linktimecloud/my_awesome_model_classification_w_adapter/config.json
-
curl -L -o config.json https://huggingface.co/linktimecloud/my_awesome_model_classification_w_adapter/resolve/main/config.json
2.01 kB
| { | |
| "_name_or_path": "roberta-base", | |
| "adapters": { | |
| "adapters": { | |
| "imdb": "9076f36a74755ac4" | |
| }, | |
| "config_map": { | |
| "9076f36a74755ac4": { | |
| "adapter_residual_before_ln": false, | |
| "cross_adapter": false, | |
| "factorized_phm_W": true, | |
| "factorized_phm_rule": false, | |
| "hypercomplex_nonlinearity": "glorot-uniform", | |
| "init_weights": "bert", | |
| "inv_adapter": null, | |
| "inv_adapter_reduction_factor": null, | |
| "is_parallel": false, | |
| "learn_phm": true, | |
| "leave_out": [], | |
| "ln_after": false, | |
| "ln_before": false, | |
| "mh_adapter": false, | |
| "non_linearity": "relu", | |
| "original_ln_after": true, | |
| "original_ln_before": true, | |
| "output_adapter": true, | |
| "phm_bias": true, | |
| "phm_c_init": "normal", | |
| "phm_dim": 4, | |
| "phm_init_range": 0.0001, | |
| "phm_layer": false, | |
| "phm_rank": 1, | |
| "reduction_factor": 16, | |
| "residual_before_ln": true, | |
| "scaling": 1.0, | |
| "shared_W_phm": false, | |
| "shared_phm_rule": true, | |
| "use_gating": false | |
| } | |
| }, | |
| "fusion_config_map": {}, | |
| "fusions": {} | |
| }, | |
| "architectures": [ | |
| "RobertaForSequenceClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "eos_token_id": 2, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "NEGATIVE", | |
| "1": "POSITIVE" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "NEGATIVE": 0, | |
| "POSITIVE": 1 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 514, | |
| "model_type": "roberta", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "position_embedding_type": "absolute", | |
| "problem_type": "single_label_classification", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.26.1", | |
| "type_vocab_size": 1, | |
| "use_cache": true, | |
| "vocab_size": 50265 | |
| } | |