Text Generation
Transformers.js
ONNX
English
lfm2
liquid
edge
extraction
spelling-creator
conversational
Instructions to use playforgecoding/LFM2-1.2B-Extract-lesson-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use playforgecoding/LFM2-1.2B-Extract-lesson-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'playforgecoding/LFM2-1.2B-Extract-lesson-ONNX');
Model card, formatted
Browse files
README.md
CHANGED
|
@@ -37,11 +37,11 @@ model's card.
|
|
| 37 |
|
| 38 |
## Files
|
| 39 |
|
| 40 |
-
| file | for | note
|
| 41 |
-
| ----------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- |
|
| 42 |
-
| `onnx/model_q4f16.onnx` | WebGPU (`device: "webgpu"`, `dtype: "q4f16"`) | Verified: copies a real section faithfully in Chromium. The one to ship in a browser.
|
| 43 |
| `onnx/model_int8.onnx` | CPU: Node and the wasm backend (`dtype: "int8"`) | Verified through transformers.js on the held-out lessons: answers 96 to 100% exact on six of seven layouts (see below). The one to use on a CPU. |
|
| 44 |
-
| `onnx/model_q4.onnx` | CPU | Not faithful for this checkpoint: paraphrases instead of copying. Kept for reference.
|
| 45 |
|
| 46 |
## Results of the int8 export
|
| 47 |
|
|
@@ -49,15 +49,15 @@ Scored through transformers.js (onnxruntime-node, `dtype: "int8"`) on the two
|
|
| 49 |
lessons held out of training, two sections each, in all seven document layouts
|
| 50 |
the training data used:
|
| 51 |
|
| 52 |
-
| layout
|
| 53 |
-
| ---------------------------
|
| 54 |
-
| Word export as raw text
|
| 55 |
-
| numbered, bracketed answers
|
| 56 |
-
| Q and A lines
|
| 57 |
-
| bare capitals, no headings
|
| 58 |
-
| bullets, square brackets
|
| 59 |
-
| numbered, colon
|
| 60 |
-
| working-out on its own line
|
| 61 |
|
| 62 |
The one miss in the capitals layout is a single long section where the reply
|
| 63 |
hit the 1,500-token cap before closing its JSON; the other three sections in
|
|
|
|
| 37 |
|
| 38 |
## Files
|
| 39 |
|
| 40 |
+
| file | for | note |
|
| 41 |
+
| ----------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| 42 |
+
| `onnx/model_q4f16.onnx` | WebGPU (`device: "webgpu"`, `dtype: "q4f16"`) | Verified: copies a real section faithfully in Chromium. The one to ship in a browser. |
|
| 43 |
| `onnx/model_int8.onnx` | CPU: Node and the wasm backend (`dtype: "int8"`) | Verified through transformers.js on the held-out lessons: answers 96 to 100% exact on six of seven layouts (see below). The one to use on a CPU. |
|
| 44 |
+
| `onnx/model_q4.onnx` | CPU | Not faithful for this checkpoint: paraphrases instead of copying. Kept for reference. |
|
| 45 |
|
| 46 |
## Results of the int8 export
|
| 47 |
|
|
|
|
| 49 |
lessons held out of training, two sections each, in all seven document layouts
|
| 50 |
the training data used:
|
| 51 |
|
| 52 |
+
| layout | parsed | passage words | spelling | prompts | answers |
|
| 53 |
+
| --------------------------- | -----: | ------------: | -------: | ------: | ------: |
|
| 54 |
+
| Word export as raw text | 100% | 100% | 100% | 100% | 100% |
|
| 55 |
+
| numbered, bracketed answers | 100% | 100% | 100% | 100% | 100% |
|
| 56 |
+
| Q and A lines | 100% | 100% | 81% | 100% | 98% |
|
| 57 |
+
| bare capitals, no headings | 75% | 75% | 75% | 75% | 75% |
|
| 58 |
+
| bullets, square brackets | 100% | 100% | 100% | 100% | 100% |
|
| 59 |
+
| numbered, colon | 100% | 100% | 100% | 98% | 96% |
|
| 60 |
+
| working-out on its own line | 100% | 100% | 100% | 100% | 100% |
|
| 61 |
|
| 62 |
The one miss in the capitals layout is a single long section where the reply
|
| 63 |
hit the 1,500-token cap before closing its JSON; the other three sections in
|