Push model using huggingface_hub.
Browse files- README.md +5 -143
- config.json +64 -2
- model.safetensors +1 -1
README.md
CHANGED
@@ -1,147 +1,9 @@
|
|
1 |
---
|
2 |
-
base_model: google-bert/bert-base-uncased
|
3 |
-
datasets:
|
4 |
-
- prithivMLmods/Spam-Text-Detect-Analysis
|
5 |
-
license: apache-2.0
|
6 |
tags:
|
7 |
-
-
|
8 |
-
-
|
9 |
---
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
## Model Details
|
18 |
-
|
19 |
-
### Model Description
|
20 |
-
|
21 |
-
<!-- Provide a longer summary of what this model is. -->
|
22 |
-
|
23 |
-
ESM
|
24 |
-
|
25 |
-
- **Developed by:** [Unknown]
|
26 |
-
- **Model type:** ESM
|
27 |
-
- **Base Model:** google-bert/bert-base-uncased
|
28 |
-
- **Intermediate Task:** prithivMLmods/Spam-Text-Detect-Analysis
|
29 |
-
- **ESM architecture:** linear
|
30 |
-
- **ESM embedding dimension:** 768
|
31 |
-
- **Language(s) (NLP):** [More Information Needed]
|
32 |
-
- **License:** Apache-2.0 license
|
33 |
-
|
34 |
-
## Training Details
|
35 |
-
|
36 |
-
### Intermediate Task
|
37 |
-
- **Task ID:** prithivMLmods/Spam-Text-Detect-Analysis
|
38 |
-
- **Subset [optional]:**
|
39 |
-
- **Text Column:** Message
|
40 |
-
- **Label Column:** Category
|
41 |
-
- **Dataset Split:** train
|
42 |
-
- **Sample size [optional]:** 1000
|
43 |
-
- **Sample seed [optional]:**
|
44 |
-
|
45 |
-
### Training Procedure [optional]
|
46 |
-
|
47 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
48 |
-
|
49 |
-
#### Language Model Training Hyperparameters [optional]
|
50 |
-
- **Epochs:** [More Information Needed]
|
51 |
-
- **Batch size:** [More Information Needed]
|
52 |
-
- **Learning rate:** [More Information Needed]
|
53 |
-
- **Weight Decay:** [More Information Needed]
|
54 |
-
- **Optimizer**: [More Information Needed]
|
55 |
-
|
56 |
-
### ESM Training Hyperparameters [optional]
|
57 |
-
- **Epochs:** 10
|
58 |
-
- **Batch size:** 32
|
59 |
-
- **Learning rate:** 0.001
|
60 |
-
- **Weight Decay:** 0.01
|
61 |
-
- **Optimizer**: [More Information Needed]
|
62 |
-
|
63 |
-
|
64 |
-
### Additional trainiung details [optional]
|
65 |
-
|
66 |
-
|
67 |
-
## Model evaluation
|
68 |
-
|
69 |
-
### Evaluation of fine-tuned language model [optional]
|
70 |
-
|
71 |
-
|
72 |
-
### Evaluation of ESM [optional]
|
73 |
-
MSE:
|
74 |
-
|
75 |
-
### Additional evaluation details [optional]
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
## What are Embedding Space Maps?
|
80 |
-
|
81 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
82 |
-
Embedding Space Maps (ESMs) are neural networks that approximate the effect of fine-tuning a language model on a task. They can be used to quickly transform embeddings from a base model to approximate how a fine-tuned model would embed the the input text.
|
83 |
-
ESMs can be used for intermediate task selection with the ESM-LogME workflow.
|
84 |
-
|
85 |
-
## How can I use Embedding Space Maps for Intermediate Task Selection?
|
86 |
-
[](https://pypi.org/project/hf-dataset-selector)
|
87 |
-
|
88 |
-
We release **hf-dataset-selector**, a Python package for intermediate task selection using Embedding Space Maps.
|
89 |
-
|
90 |
-
**hf-dataset-selector** fetches ESMs for a given language model and uses it to find the best dataset for applying intermediate training to the target task. ESMs are found by their tags on the Huggingface Hub.
|
91 |
-
|
92 |
-
```python
|
93 |
-
from hfselect import Dataset, compute_task_ranking
|
94 |
-
|
95 |
-
# Load target dataset from the Hugging Face Hub
|
96 |
-
dataset = Dataset.from_hugging_face(
|
97 |
-
name="stanfordnlp/imdb",
|
98 |
-
split="train",
|
99 |
-
text_col="text",
|
100 |
-
label_col="label",
|
101 |
-
is_regression=False,
|
102 |
-
num_examples=1000,
|
103 |
-
seed=42
|
104 |
-
)
|
105 |
-
|
106 |
-
# Fetch ESMs and rank tasks
|
107 |
-
task_ranking = compute_task_ranking(
|
108 |
-
dataset=dataset,
|
109 |
-
model_name="bert-base-multilingual-uncased"
|
110 |
-
)
|
111 |
-
|
112 |
-
# Display top 5 recommendations
|
113 |
-
print(task_ranking[:5])
|
114 |
-
```
|
115 |
-
|
116 |
-
For more information on how to use ESMs please have a look at the [official Github repository](https://github.com/davidschulte/hf-dataset-selector).
|
117 |
-
|
118 |
-
## Citation
|
119 |
-
|
120 |
-
|
121 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
122 |
-
If you are using this Embedding Space Maps, please cite our [paper](https://arxiv.org/abs/2410.15148).
|
123 |
-
|
124 |
-
**BibTeX:**
|
125 |
-
|
126 |
-
|
127 |
-
```
|
128 |
-
@misc{schulte2024moreparameterefficientselectionintermediate,
|
129 |
-
title={Less is More: Parameter-Efficient Selection of Intermediate Tasks for Transfer Learning},
|
130 |
-
author={David Schulte and Felix Hamborg and Alan Akbik},
|
131 |
-
year={2024},
|
132 |
-
eprint={2410.15148},
|
133 |
-
archivePrefix={arXiv},
|
134 |
-
primaryClass={cs.CL},
|
135 |
-
url={https://arxiv.org/abs/2410.15148},
|
136 |
-
}
|
137 |
-
```
|
138 |
-
|
139 |
-
|
140 |
-
**APA:**
|
141 |
-
|
142 |
-
```
|
143 |
-
Schulte, D., Hamborg, F., & Akbik, A. (2024). Less is More: Parameter-Efficient Selection of Intermediate Tasks for Transfer Learning. arXiv preprint arXiv:2410.15148.
|
144 |
-
```
|
145 |
-
|
146 |
-
## Additional Information
|
147 |
-
|
|
|
1 |
---
|
|
|
|
|
|
|
|
|
2 |
tags:
|
3 |
+
- model_hub_mixin
|
4 |
+
- pytorch_model_hub_mixin
|
5 |
---
|
6 |
|
7 |
+
This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
|
8 |
+
- Library: [More Information Needed]
|
9 |
+
- Docs: [More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.json
CHANGED
@@ -1,27 +1,89 @@
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
2 |
"base_model_name": "google-bert/bert-base-uncased",
|
|
|
|
|
|
|
|
|
|
|
3 |
"developers": null,
|
|
|
|
|
|
|
|
|
|
|
4 |
"esm_architecture": "linear",
|
5 |
"esm_batch_size": 32,
|
6 |
"esm_embedding_dim": 768,
|
7 |
-
"esm_learning_rate": 0.
|
8 |
"esm_num_epochs": 10,
|
9 |
"esm_optimizer": null,
|
10 |
"esm_weight_decay": 0.01,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
"label_column": "Category",
|
12 |
"language": null,
|
|
|
13 |
"lm_batch_size": null,
|
14 |
"lm_learning_rate": null,
|
15 |
"lm_num_epochs": null,
|
16 |
"lm_optimizer": null,
|
17 |
"lm_weight_decay": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
"num_examples": 1000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
"seed": null,
|
|
|
20 |
"streamed": false,
|
|
|
21 |
"task_id": "prithivMLmods/Spam-Text-Detect-Analysis",
|
|
|
22 |
"task_split": "train",
|
23 |
"task_subset": null,
|
|
|
24 |
"text_column": "Message",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
"transformers_version": "4.47.1",
|
|
|
|
|
26 |
"version": "0.2.0"
|
27 |
-
}
|
|
|
1 |
{
|
2 |
+
"_attn_implementation_autoset": false,
|
3 |
+
"_name_or_path": "",
|
4 |
+
"add_cross_attention": false,
|
5 |
+
"architectures": null,
|
6 |
+
"bad_words_ids": null,
|
7 |
"base_model_name": "google-bert/bert-base-uncased",
|
8 |
+
"begin_suppress_tokens": null,
|
9 |
+
"bos_token_id": null,
|
10 |
+
"chunk_size_feed_forward": 0,
|
11 |
+
"cross_attention_hidden_size": null,
|
12 |
+
"decoder_start_token_id": null,
|
13 |
"developers": null,
|
14 |
+
"diversity_penalty": 0.0,
|
15 |
+
"do_sample": false,
|
16 |
+
"early_stopping": false,
|
17 |
+
"encoder_no_repeat_ngram_size": 0,
|
18 |
+
"eos_token_id": null,
|
19 |
"esm_architecture": "linear",
|
20 |
"esm_batch_size": 32,
|
21 |
"esm_embedding_dim": 768,
|
22 |
+
"esm_learning_rate": 0.01,
|
23 |
"esm_num_epochs": 10,
|
24 |
"esm_optimizer": null,
|
25 |
"esm_weight_decay": 0.01,
|
26 |
+
"exponential_decay_length_penalty": null,
|
27 |
+
"finetuning_task": null,
|
28 |
+
"forced_bos_token_id": null,
|
29 |
+
"forced_eos_token_id": null,
|
30 |
+
"id2label": {
|
31 |
+
"0": "LABEL_0",
|
32 |
+
"1": "LABEL_1"
|
33 |
+
},
|
34 |
+
"is_decoder": false,
|
35 |
+
"is_encoder_decoder": false,
|
36 |
+
"label2id": {
|
37 |
+
"LABEL_0": 0,
|
38 |
+
"LABEL_1": 1
|
39 |
+
},
|
40 |
"label_column": "Category",
|
41 |
"language": null,
|
42 |
+
"length_penalty": 1.0,
|
43 |
"lm_batch_size": null,
|
44 |
"lm_learning_rate": null,
|
45 |
"lm_num_epochs": null,
|
46 |
"lm_optimizer": null,
|
47 |
"lm_weight_decay": null,
|
48 |
+
"max_length": 20,
|
49 |
+
"min_length": 0,
|
50 |
+
"model_type": "",
|
51 |
+
"no_repeat_ngram_size": 0,
|
52 |
+
"num_beam_groups": 1,
|
53 |
+
"num_beams": 1,
|
54 |
"num_examples": 1000,
|
55 |
+
"num_return_sequences": 1,
|
56 |
+
"output_attentions": false,
|
57 |
+
"output_hidden_states": false,
|
58 |
+
"output_scores": false,
|
59 |
+
"pad_token_id": null,
|
60 |
+
"prefix": null,
|
61 |
+
"problem_type": null,
|
62 |
+
"pruned_heads": {},
|
63 |
+
"remove_invalid_values": false,
|
64 |
+
"repetition_penalty": 1.0,
|
65 |
+
"return_dict": true,
|
66 |
+
"return_dict_in_generate": false,
|
67 |
"seed": null,
|
68 |
+
"sep_token_id": null,
|
69 |
"streamed": false,
|
70 |
+
"suppress_tokens": null,
|
71 |
"task_id": "prithivMLmods/Spam-Text-Detect-Analysis",
|
72 |
+
"task_specific_params": null,
|
73 |
"task_split": "train",
|
74 |
"task_subset": null,
|
75 |
+
"temperature": 1.0,
|
76 |
"text_column": "Message",
|
77 |
+
"tf_legacy_loss": false,
|
78 |
+
"tie_encoder_decoder": false,
|
79 |
+
"tie_word_embeddings": true,
|
80 |
+
"tokenizer_class": null,
|
81 |
+
"top_k": 50,
|
82 |
+
"top_p": 1.0,
|
83 |
+
"torch_dtype": null,
|
84 |
+
"torchscript": false,
|
85 |
"transformers_version": "4.47.1",
|
86 |
+
"typical_p": 1.0,
|
87 |
+
"use_bfloat16": false,
|
88 |
"version": "0.2.0"
|
89 |
+
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 2362528
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2c341a7ec672afe7740ce0321d8e7ed2901050c6e2cf658eaac9941e176aedd4
|
3 |
size 2362528
|