bdauzats commited on
Commit
a353ce2
·
verified ·
1 Parent(s): bbe6c31

jul-decision-e5-small: first release

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: intfloat/multilingual-e5-small
3
+ license: apache-2.0
4
+ language:
5
+ - en
6
+ - fr
7
+ - multilingual
8
+ pipeline_tag: zero-shot-classification
9
+ library_name: transformers
10
+ tags:
11
+ - jul
12
+ - zero-shot-classification
13
+ ---
14
+
15
+ # jul-decision-e5-small
16
+
17
+ [`multilingual-e5-small`](https://huggingface.co/intfloat/multilingual-e5-small) fine-tuned to answer
18
+ [jul](https://github.com/usejul/jul) decisions in zero-shot. Same size and speed as e5-small; ONNX int8
19
+ build (98 MB): [`usejul/jul-decision-e5-small-onnx`](https://huggingface.co/usejul/jul-decision-e5-small-onnx).
20
+
21
+ ```bash
22
+ jul models add jul-decision-e5-small --repo usejul/jul-decision-e5-small-onnx --backend onnx
23
+ ```
24
+
25
+ Inputs are prefixed with `query: ` (declared in `config_sentence_transformers.json`).
26
+
27
+ ## Results
28
+
29
+ | | e5-small | jul-decision-e5-small |
30
+ | --- | ---: | ---: |
31
+ | zero-shot, jul dev sets (n = 800) | 0.532 | **0.611** |
32
+ | tuned hybrid head (AG News, Banking77, Emotion) | 0.782 | **0.790** |
33
+ | SIB-200, 6 languages not trained on (task seen in en/fr) | 0.639 | **0.839** |
34
+
35
+ Part of the zero-shot gain comes from task types seen in training (financial sentiment, topics).
36
+ With task data (a `Context` or a tuned head) the two models are close.
37
+
38
+ ## Training
39
+
40
+ jul's own score as the loss, on public English and French classification datasets. Embeddings frozen,
41
+ 1,000 steps on one GPU.
42
+
43
+ ## License
44
+
45
+ Apache-2.0. Based on [multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) (MIT).
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": null,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": null,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 384,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "is_decoder": false,
17
+ "layer_norm_eps": 1e-12,
18
+ "max_position_embeddings": 512,
19
+ "model_type": "bert",
20
+ "num_attention_heads": 12,
21
+ "num_hidden_layers": 12,
22
+ "pad_token_id": 0,
23
+ "position_embedding_type": "absolute",
24
+ "tie_word_embeddings": true,
25
+ "tokenizer_class": "XLMRobertaTokenizer",
26
+ "transformers_version": "5.17.0",
27
+ "type_vocab_size": 2,
28
+ "use_cache": true,
29
+ "vocab_size": 250037
30
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "prompts": {"query": "query: ", "passage": "passage: "},
3
+ "default_prompt_name": "query"
4
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c421f95d30d77a9915e5689c1777196917ca7160af577e6c671769dc2d3427be
3
+ size 470637416
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6040ba36e3e2f7b2fa6ae076b69d024a08666bea4c345105a32e542900fcc7e7
3
+ size 17082735
tokenizer_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "clean_up_tokenization_spaces": true,
6
+ "cls_token": "<s>",
7
+ "eos_token": "</s>",
8
+ "is_local": false,
9
+ "local_files_only": false,
10
+ "mask_token": "<mask>",
11
+ "model_max_length": 512,
12
+ "pad_token": "<pad>",
13
+ "sep_token": "</s>",
14
+ "sp_model_kwargs": {},
15
+ "tokenizer_class": "XLMRobertaTokenizer",
16
+ "unk_token": "<unk>"
17
+ }