h0dson commited on
Commit
d65ebf9
路
verified 路
1 Parent(s): c1f4f6e

Model card

Browse files
Files changed (1) hide show
  1. README.md +41 -10
README.md CHANGED
@@ -3,31 +3,62 @@ license: mit
3
  library_name: transformers.js
4
  pipeline_tag: feature-extraction
5
  base_model: BAAI/bge-small-en-v1.5
6
- language: en
 
7
  tags:
8
  - decidekit
9
  - system-one
10
  - text-classification
 
 
11
  - onnx
 
 
12
  ---
13
 
 
 
14
  # Decide Small
15
 
16
- The sentence encoder behind Decide Small, a System One model that picks one of your labels for a piece of text on the user's device. English. 34 MB at 8-bit. [decidekit](https://debuff.jp/decide/) adds the trained head and calibrated confidence.
 
 
 
 
 
 
 
 
17
 
18
  ```ts
19
  import { createDecider } from "decidekit";
20
 
21
- const d = await createDecider();
22
- const { choice, confidence } = await d.decide("my card still hasn't arrived", ["card_arrival", "refund"]);
23
  ```
24
 
25
- - BANKING77, 77 labels, all training data: 90.7%
26
- - CLINC150, 150 labels, all training data: 94.4%
27
- - A decision in Chrome (worker, median): 7.7 ms
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
- Measured on a Ryzen 7 260 laptop. Scripts and results: [eval/results-bge-small.json](https://github.com/debuffjp/decidekit/blob/main/eval/results-bge-small.json).
30
 
31
- ## Where the weights come from
32
 
33
- These files are an unmodified copy of [Xenova/bge-small-en-v1.5](https://huggingface.co/Xenova/bge-small-en-v1.5) at revision `ea104da`, the ONNX conversion of [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5), which is MIT licensed. We did not train them. They are published here so decidekit has a stable, pinned source.
 
3
  library_name: transformers.js
4
  pipeline_tag: feature-extraction
5
  base_model: BAAI/bge-small-en-v1.5
6
+ language:
7
+ - en
8
  tags:
9
  - decidekit
10
  - system-one
11
  - text-classification
12
+ - zero-shot-classification
13
+ - calibration
14
  - onnx
15
+ - on-device
16
+ thumbnail: https://huggingface.co/debuffjp/decide-small/resolve/main/assets/banner.png
17
  ---
18
 
19
+ ![Decide Small](https://huggingface.co/debuffjp/decide-small/resolve/main/assets/banner.png)
20
+
21
  # Decide Small
22
 
23
+ Decide reads a short piece of text and picks one of your labels, on the user's device, with a confidence you can act on: answers at 0.9 are right about 90% of the time. It's the default model in [decidekit](https://debuff.jp/decide/).
24
+
25
+ [Docs](https://debuff.jp/decide/docs/) 路 [Try it in your browser](https://debuff.jp/decide/playground/) 路 [GitHub](https://github.com/debuffjp/decidekit) 路 [npm](https://www.npmjs.com/package/decidekit)
26
+
27
+ ## Use it
28
+
29
+ ```bash
30
+ npm install decidekit
31
+ ```
32
 
33
  ```ts
34
  import { createDecider } from "decidekit";
35
 
36
+ const d = await createDecider(); // loads this model
37
+ const { choice, confidence } = await d.decide("my card still hasn't arrived", ["card_arrival", "lost_card", "refund"]);
38
  ```
39
 
40
+ The files download from this repo on first use, then stay in the browser's cache. To serve them yourself, copy this repo's files to your own host and pass `modelHost` to `createDecider()`.
41
+
42
+ ## Numbers
43
+
44
+ | | |
45
+ |---|---|
46
+ | BANKING77, 77 labels, all training data | 90.7% |
47
+ | CLINC150, 150 labels, all training data | 94.4% |
48
+ | BANKING77 with 5 examples per label | 82.3% |
49
+ | A decision in Chrome (worker, median) | 7.7 ms |
50
+ | Download at 8-bit | 34 MB |
51
+
52
+ Ryzen 7 260 laptop, Chrome 156. Results and scripts: [eval/results-bge-small.json](https://github.com/debuffjp/decidekit/blob/main/eval/results-bge-small.json).
53
+
54
+ ## Limits
55
+
56
+ - English. Use [Decide Multilingual](https://huggingface.co/debuffjp/decide-multilingual) for other languages.
57
+ - It reads what a text is about better than how it feels: 61% on tweet sentiment.
58
+ - About a paragraph at a time. Split longer text.
59
 
60
+ ## What's in this repo
61
 
62
+ This repo holds the encoder, the part that turns text into vectors. decidekit adds the trained head and the calibrated confidence.
63
 
64
+ The weights are an unmodified copy of [Xenova/bge-small-en-v1.5](https://huggingface.co/Xenova/bge-small-en-v1.5) at revision `ea104da`, the ONNX conversion of [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). We did not train them. They are here so decidekit has a stable, pinned source. MIT licensed, like the original.