PeytonT commited on
Commit
4b5f1d9
·
verified ·
1 Parent(s): 46f436d

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/bert_uncased_L-4_H-256_A-4
4
+ library_name: onnx
5
+ pipeline_tag: feature-extraction
6
+ tags:
7
+ - sentence-transformers
8
+ - embeddings
9
+ - scientific-papers
10
+ - distillation
11
+ - onnx
12
+ - int8
13
+ - wasm
14
+ - research-library
15
+ datasets:
16
+ - PeytonT/1m_papers_text
17
+ - PeytonT/paper_universe_interactive
18
+ language:
19
+ - en
20
+ ---
21
+
22
+ # M1-Lite Paper Embedding Model ONNX
23
+
24
+ This is a compact student encoder distilled from `PeytonT/1m-paper-embedding-model` over the 1M paper corpus.
25
+ It predicts the same 768-dimensional, L2-normalized M1 embedding space used by the Research Library paper universe.
26
+
27
+ ## Files
28
+
29
+ | Path | Description |
30
+ | --- | --- |
31
+ | `onnx/model.onnx` | Float ONNX student encoder. |
32
+ | `onnx/model.int8.onnx` | Dynamically quantized int8 ONNX model for browser/WASM inference. |
33
+ | `tokenizer/` | Student tokenizer files. |
34
+ | `manifest.json` | Export metadata consumed by the static viewer. |
35
+
36
+ ## Training
37
+
38
+ - teacher target: `exports/huggingface/paper_universe_interactive_v1/semantic_m1/papers_all.emb.i8`
39
+ - interactive level: `exports/huggingface/paper_universe_interactive_v1/interactive/papers_all.json`
40
+ - rows: `1,000,000`
41
+ - final eval cosine vs M1 targets: `0.7351`
42
+ - final eval MSE vs M1 targets: `0.000690`
43
+ - int8 ONNX size: `33.7 MB`
44
+
45
+ ## Embedding Format
46
+
47
+ - output name: `embedding`
48
+ - shape: `[batch, 768]`
49
+ - pooling: attention-mask mean pooling, projection to 768 dimensions, L2 normalization
50
+ - intended max sequence length: `128`
51
+
52
+ The output is compatible with the existing `semantic_m1/*.emb.i8` paper-vector files.
checkpoints/step-1000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b779a15ca9406caf791e1f53754d7339b44eb26f10b49e9818575d9f8eacd497
3
+ size 135980363
checkpoints/step-2000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d925c23dce69396d1a1f8468a9c9f805c9b60fdbe9a0092fb7593b39d07a852f
3
+ size 135980363
checkpoints/step-3000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c0849da8aaa8638cab787c862f2932c84b03ffd4ec9e54ee70c5dac25e192dc
3
+ size 135980363
checkpoints/step-4000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1aa4dc7ec490aad4fe6051b2f8678216085affbb580059345eeab6419f682d0
3
+ size 135980363
checkpoints/step-5000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab9bbdef4b272b5701c413997f58f3ad8211c60ca3a9a3634bbcdddf8f3f1583
3
+ size 135980363
checkpoints/step-6000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9c0392316bd243a8a4a160bd5543904c87fc318b816e6bab101787f478bebd4
3
+ size 135980363
checkpoints/step-7000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f7aa2955d015f191a5a62d7c668c785679dabea2e4f6f710f48238d0f893910
3
+ size 135980363
manifest.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "browser_note": "Same input and output names as the full M1 SciBERT ONNX export; can query semantic_m1 paper vector files.",
3
+ "built_at": 1777171028,
4
+ "dimension": 768,
5
+ "interactive_level": "exports/huggingface/paper_universe_interactive_v1/interactive/papers_all.json",
6
+ "model_kind": "m1_lite_distilled_embedding",
7
+ "normalization": "l2",
8
+ "onnx": "onnx/model.onnx",
9
+ "pooling": "mean_pool_attention_mask_project_l2_normalized",
10
+ "quantized_onnx": "onnx/model.int8.onnx",
11
+ "scale": 127.0,
12
+ "sequence_length": 128,
13
+ "source_dir": "/arxiv/huggingface/paper_text_1m_dedup_v1",
14
+ "student_id": "google/bert_uncased_L-4_H-256_A-4",
15
+ "target_embeddings": "exports/huggingface/paper_universe_interactive_v1/semantic_m1/papers_all.emb.i8",
16
+ "teacher_base_id": "allenai/scibert_scivocab_uncased",
17
+ "teacher_id": "PeytonT/1m-paper-embedding-model",
18
+ "tokenizer": "tokenizer",
19
+ "train_stats": {
20
+ "eval_cosine": 0.7350965235382318,
21
+ "eval_mse": 0.0006898527972225565,
22
+ "final_cosine": 0.739337682723999,
23
+ "final_loss": 0.2609059512615204,
24
+ "global_steps": 7813,
25
+ "missing_texts": 0,
26
+ "rows": 1000000,
27
+ "train_seconds": 473.90148282051086
28
+ }
29
+ }
onnx/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:990eaeb36042b83b014796f2aa4b479fc56f64239cdded8be266375b246829f2
3
+ size 35376665
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5df46ca7344ceff011e8198b4d436fcdf0ffbc1ef6cd274a0ae7fd7c6c4ab7ed
3
+ size 45289801
pytorch/config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "m1_lite_distilled_embedding",
3
+ "output_dim": 768,
4
+ "pooling": "mean_pool_attention_mask_project_l2_normalized",
5
+ "student_id": "google/bert_uncased_L-4_H-256_A-4",
6
+ "teacher_base_id": "allenai/scibert_scivocab_uncased",
7
+ "teacher_id": "PeytonT/1m-paper-embedding-model",
8
+ "train_stats": {
9
+ "eval_cosine": 0.7350965235382318,
10
+ "eval_mse": 0.0006898527972225565,
11
+ "final_cosine": 0.739337682723999,
12
+ "final_loss": 0.2609059512615204,
13
+ "global_steps": 7813,
14
+ "missing_texts": 0,
15
+ "rows": 1000000,
16
+ "train_seconds": 473.90148282051086
17
+ }
18
+ }
pytorch/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29b1bd3f06aba867d8094882d954ba5a0e077af0ae4036976bbe9d61ec6f3f26
3
+ size 45502626
tokenizer/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
tokenizer/vocab.txt ADDED
The diff for this file is too large to render. See raw diff