Instructions to use onnx-community/glm-edge-1.5b-chat-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/glm-edge-1.5b-chat-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'onnx-community/glm-edge-1.5b-chat-ONNX');
Transformers.js - Enable external data format in Node.js
Browse filesSee https://github.com/huggingface/transformers.js/pull/1212 for more information.
- config.json +6 -2
config.json
CHANGED
|
@@ -29,8 +29,12 @@
|
|
| 29 |
"torch_dtype": "float32",
|
| 30 |
"transformers_version": "4.49.0.dev0",
|
| 31 |
"transformers.js_config": {
|
| 32 |
-
"dtype": "q4"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
},
|
| 34 |
"use_cache": true,
|
| 35 |
"vocab_size": 59264
|
| 36 |
-
}
|
|
|
|
| 29 |
"torch_dtype": "float32",
|
| 30 |
"transformers_version": "4.49.0.dev0",
|
| 31 |
"transformers.js_config": {
|
| 32 |
+
"dtype": "q4",
|
| 33 |
+
"use_external_data_format": {
|
| 34 |
+
"model.onnx": true,
|
| 35 |
+
"model_fp16.onnx": true
|
| 36 |
+
}
|
| 37 |
},
|
| 38 |
"use_cache": true,
|
| 39 |
"vocab_size": 59264
|
| 40 |
+
}
|