noch inator commited on
Commit
4fcd291
·
verified ·
1 Parent(s): 381e449

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +100 -3
README.md CHANGED
@@ -1,3 +1,100 @@
1
- ---
2
- license: agpl-3.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: agpl-3.0
3
+ datasets:
4
+ - JeanKaddour/minipile
5
+ language:
6
+ - en
7
+ pipeline_tag: text2text-generation
8
+ ---
9
+ # Model Card for Model ID
10
+
11
+ A new way to create embeddings
12
+
13
+ ## Model Details
14
+
15
+ ### Model Description
16
+
17
+ Auto-regressivly generates thought vectors (embeddings) for an input. This means fewer elements for the core model to process and thereby less compute to use. Additionally it can decode a thought vector
18
+ back into a (vaugly) similar meaning in text. It doesn't focus on exact wording, but rather capturing the full meaning of the input.
19
+
20
+ - **Developed by:** nochinator
21
+ - **Model type:** embeddings
22
+ - **Language(s) (NLP):** English
23
+ - **License:** AGPL-3.0
24
+
25
+ ### Model Sources
26
+
27
+ - **Repository:** https://huggingface.co/nochiantor/ThoughtVectors
28
+ - **Paper:** Comming soon?
29
+ - **Demo:** Comming soon?
30
+
31
+ ## Uses
32
+
33
+ Specifically built for use in chatbots, but the embeddings should apply for any NLP system that doesn't rely on percise wording, but just capturing the meaning of input,
34
+ however more percisely then sentence level embeddings.
35
+
36
+ ### Direct Use
37
+
38
+ Comming soon.
39
+
40
+ ## Bias, Risks, and Limitations
41
+
42
+ Adds a small amount of compute to the front (and if using decoder, back) of the overall system compared to other embedding mechanisms. However, if the core model is larger
43
+ then it should end up saving compute.
44
+
45
+ ## How to Get Started with the Model
46
+
47
+ This "model" is actually a collection of models that don't work without each other (excepting SentencePiece). A library is included in the files to manage it for you.
48
+
49
+ ### Training Data
50
+
51
+ https://huggingface.co/datasets/JeanKaddour/minipile
52
+
53
+ ### Training Procedure
54
+
55
+ Trained by taking a sentence, tokenizing, passing through an encoder to get thought vectors then passing the vectors through the decoder to back tokens and comparing
56
+ with original tokens, then backpropagating the error through both encoder and decoder. Slightly punishes for longer sets of vectors to encurage fewer vectors.
57
+
58
+
59
+ #### Training Hyperparameters
60
+
61
+ group_data=data,
62
+ num_epochs=1000,
63
+ batch_size=128,
64
+ val_split=0.8,
65
+ learning_rate=2e-4,
66
+ weight_decay=5e-5,
67
+ length_penalty=0.01,
68
+ single_vector_prob=0.2,
69
+ save_path="thought_vectors_prototype.tar",
70
+ spm_model_prefix="spm",
71
+ vocab_size=8192,
72
+ d_model=1024,
73
+ encoder_nhead=8,
74
+ decoder_nhead=8,
75
+ encoder_layers=4,
76
+ decoder_layers=4,
77
+ max_thoughts=32,
78
+ dropout=0.1,
79
+ max_len=256,
80
+ termination_threshold=0.9,
81
+ patience=10
82
+
83
+ Data is a generator for MiniPile
84
+
85
+ ## Evaluation
86
+
87
+ Comming soon
88
+
89
+ #### Testing Data
90
+
91
+ https://huggingface.co/datasets/JeanKaddour/minipile
92
+
93
+ ### Model Architecture and Objective
94
+
95
+ Strings -> SentencePiece - Tokens -> Encoder -> Thought Vectors -> Thinker (your processing system) -> Thought Vectors (transformed, or just raw output) -> Decoder -> Tokens -> SentencePiece -> String
96
+
97
+ ## Glossary
98
+
99
+ "Thought Vector" is the name I have given to this type of embedding - a vector that represents thoughts rather than words or tokens.
100
+ A "Thought" is a complete collection of thought vectors representing a full thought