Text Generation
Transformers.js
ONNX
llama
webgpu
q4f16
gptq
tool-calling
experimental
conversational
Instructions to use webbrain-one/webbrain-compass-tiny-v2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use webbrain-one/webbrain-compass-tiny-v2.1 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'webbrain-one/webbrain-compass-tiny-v2.1');
Download runtime/vendor/onnxruntime-common/trace.js from webbrain-one/webbrain-compass-tiny-v2.1: direct link, hf CLI and curl.
- Browser
- Download file 1.89 kB
-
https://huggingface.co/webbrain-one/webbrain-compass-tiny-v2.1/resolve/main/runtime/vendor/onnxruntime-common/trace.js
- Command line
-
hf download hf://webbrain-one/webbrain-compass-tiny-v2.1/runtime/vendor/onnxruntime-common/trace.js
-
curl -L -o trace.js https://huggingface.co/webbrain-one/webbrain-compass-tiny-v2.1/resolve/main/runtime/vendor/onnxruntime-common/trace.js
1.89 kB
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // Licensed under the MIT License. | |
| import { env } from './env-impl.js'; | |
| /** | |
| * @ignore | |
| */ | |
| export const TRACE = (deviceType, label) => { | |
| if (typeof env.trace === 'undefined' ? !env.wasm.trace : !env.trace) { | |
| return; | |
| } | |
| // eslint-disable-next-line no-console | |
| console.timeStamp(`${deviceType}::ORT::${label}`); | |
| }; | |
| const TRACE_FUNC = (msg, extraMsg) => { | |
| const stack = new Error().stack?.split(/\r\n|\r|\n/g) || []; | |
| let hasTraceFunc = false; | |
| for (let i = 0; i < stack.length; i++) { | |
| if (hasTraceFunc && !stack[i].includes('TRACE_FUNC')) { | |
| let label = `FUNC_${msg}::${stack[i].trim().split(' ')[1]}`; | |
| if (extraMsg) { | |
| label += `::${extraMsg}`; | |
| } | |
| TRACE('CPU', label); | |
| return; | |
| } | |
| if (stack[i].includes('TRACE_FUNC')) { | |
| hasTraceFunc = true; | |
| } | |
| } | |
| }; | |
| /** | |
| * @ignore | |
| */ | |
| export const TRACE_FUNC_BEGIN = (extraMsg) => { | |
| if (typeof env.trace === 'undefined' ? !env.wasm.trace : !env.trace) { | |
| return; | |
| } | |
| TRACE_FUNC('BEGIN', extraMsg); | |
| }; | |
| /** | |
| * @ignore | |
| */ | |
| export const TRACE_FUNC_END = (extraMsg) => { | |
| if (typeof env.trace === 'undefined' ? !env.wasm.trace : !env.trace) { | |
| return; | |
| } | |
| TRACE_FUNC('END', extraMsg); | |
| }; | |
| /** | |
| * @ignore | |
| */ | |
| export const TRACE_EVENT_BEGIN = (extraMsg) => { | |
| if (typeof env.trace === 'undefined' ? !env.wasm.trace : !env.trace) { | |
| return; | |
| } | |
| // eslint-disable-next-line no-console | |
| console.time(`ORT::${extraMsg}`); | |
| }; | |
| /** | |
| * @ignore | |
| */ | |
| export const TRACE_EVENT_END = (extraMsg) => { | |
| if (typeof env.trace === 'undefined' ? !env.wasm.trace : !env.trace) { | |
| return; | |
| } | |
| // eslint-disable-next-line no-console | |
| console.timeEnd(`ORT::${extraMsg}`); | |
| }; | |
| //# sourceMappingURL=trace.js.map |