Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@lenml/tokenizers

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lenml/tokenizers - npm Package Compare versions

Comparing version
1.0.9
to
1.1.1
+5
src/prepatch.ts
import { AutoTokenizer, PreTrainedTokenizer } from "./tokenizers/tokenizers";
// NOTE: Set this to turn off the warning of claude tokenizer
// @ts-ignore
AutoTokenizer.TOKENIZER_CLASS_MAPPING.ClaudeTokenizer = PreTrainedTokenizer;
+1
-1
{
"name": "@lenml/tokenizers",
"version": "1.0.9",
"version": "1.1.1",
"description": "a lightweight no-dependency fork of transformers.js (only tokenizers)",

@@ -5,0 +5,0 @@ "source": "src/main.ts",

@@ -0,3 +1,4 @@

import "./prepatch";
export * from "./TokenizerLoader";
export * as tokenizers from "./tokenizers/tokenizers";
export * from "./types";

@@ -53,2 +53,6 @@ /**

constructor(...args) {
throw new Error(
`You seem to be creating a tensor object. Unfortunately, the '@lenml/tokenizers' library does not support returning any ONNX-related object instances. Please try setting 'return_tensor=false' to avoid this error`
);
if (args[0] instanceof ONNXTensor) {

@@ -55,0 +59,0 @@ // Create shallow copy

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display