@heripo/pdf-parser 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +88 -10
- package/README.md +88 -10
- package/dist/index.cjs +2049 -345
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -14
- package/dist/index.d.ts +153 -14
- package/dist/index.js +2053 -227
- package/dist/index.js.map +1 -1
- package/package.json +8 -12
- package/dist/chunk-JVYF2SQS.js +0 -495
- package/dist/chunk-JVYF2SQS.js.map +0 -1
- package/dist/chunk-VUNV25KB.js +0 -16
- package/dist/chunk-VUNV25KB.js.map +0 -1
- package/dist/chunk-WWNI354M.js +0 -121
- package/dist/chunk-WWNI354M.js.map +0 -1
- package/dist/token-HEEJ7XHP.js +0 -63
- package/dist/token-HEEJ7XHP.js.map +0 -1
- package/dist/token-util-MKHXD2JQ.js +0 -6
- package/dist/token-util-MKHXD2JQ.js.map +0 -1
- package/dist/vlm-models.cjs +0 -147
- package/dist/vlm-models.cjs.map +0 -1
- package/dist/vlm-models.d.cts +0 -34
- package/dist/vlm-models.d.ts +0 -34
- package/dist/vlm-models.js +0 -12
- package/dist/vlm-models.js.map +0 -1
package/dist/chunk-WWNI354M.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
// src/config/vlm-models.ts
|
|
2
|
-
var VLM_MODELS = {
|
|
3
|
-
// ── DocTags models (specialized document structure output) ──────────
|
|
4
|
-
"granite-docling-258M-mlx": {
|
|
5
|
-
repo_id: "ibm-granite/granite-docling-258M-mlx",
|
|
6
|
-
inference_framework: "mlx",
|
|
7
|
-
response_format: "doctags",
|
|
8
|
-
transformers_model_type: "automodel-vision2seq",
|
|
9
|
-
description: "Granite Docling 258M (MLX, Apple Silicon optimized, ~6s/page)"
|
|
10
|
-
},
|
|
11
|
-
"granite-docling-258M": {
|
|
12
|
-
repo_id: "ibm-granite/granite-docling-258M",
|
|
13
|
-
inference_framework: "transformers",
|
|
14
|
-
response_format: "doctags",
|
|
15
|
-
transformers_model_type: "automodel-vision2seq",
|
|
16
|
-
description: "Granite Docling 258M (Transformers, cross-platform)"
|
|
17
|
-
},
|
|
18
|
-
"smoldocling-256M-mlx": {
|
|
19
|
-
repo_id: "docling-project/SmolDocling-256M-preview-mlx-bf16",
|
|
20
|
-
inference_framework: "mlx",
|
|
21
|
-
response_format: "doctags",
|
|
22
|
-
transformers_model_type: "automodel-vision2seq",
|
|
23
|
-
description: "SmolDocling 256M (MLX, fastest option)"
|
|
24
|
-
},
|
|
25
|
-
"smoldocling-256M": {
|
|
26
|
-
repo_id: "docling-project/SmolDocling-256M-preview",
|
|
27
|
-
inference_framework: "transformers",
|
|
28
|
-
response_format: "doctags",
|
|
29
|
-
transformers_model_type: "automodel-vision2seq",
|
|
30
|
-
description: "SmolDocling 256M (Transformers)"
|
|
31
|
-
},
|
|
32
|
-
// ── Markdown models (general-purpose vision LLMs) ──────────────────
|
|
33
|
-
"granite-vision-2B": {
|
|
34
|
-
repo_id: "ibm-granite/granite-vision-3.2-2b",
|
|
35
|
-
inference_framework: "transformers",
|
|
36
|
-
response_format: "markdown",
|
|
37
|
-
transformers_model_type: "automodel-vision2seq",
|
|
38
|
-
description: "Granite Vision 3.2 2B (IBM, higher accuracy)"
|
|
39
|
-
},
|
|
40
|
-
"qwen25-vl-3B-mlx": {
|
|
41
|
-
repo_id: "mlx-community/Qwen2.5-VL-3B-Instruct-bf16",
|
|
42
|
-
inference_framework: "mlx",
|
|
43
|
-
response_format: "markdown",
|
|
44
|
-
transformers_model_type: "automodel-vision2seq",
|
|
45
|
-
description: "Qwen 2.5 VL 3B (MLX, multilingual, good KCJ support)"
|
|
46
|
-
},
|
|
47
|
-
phi4: {
|
|
48
|
-
repo_id: "microsoft/Phi-4-multimodal-instruct",
|
|
49
|
-
inference_framework: "transformers",
|
|
50
|
-
response_format: "markdown",
|
|
51
|
-
transformers_model_type: "automodel",
|
|
52
|
-
description: "Phi-4 Multimodal (Microsoft, CausalLM)"
|
|
53
|
-
},
|
|
54
|
-
"pixtral-12B-mlx": {
|
|
55
|
-
repo_id: "mlx-community/pixtral-12b-bf16",
|
|
56
|
-
inference_framework: "mlx",
|
|
57
|
-
response_format: "markdown",
|
|
58
|
-
transformers_model_type: "automodel-vision2seq",
|
|
59
|
-
description: "Pixtral 12B (MLX, Mistral, high accuracy)"
|
|
60
|
-
},
|
|
61
|
-
"pixtral-12B": {
|
|
62
|
-
repo_id: "mistral-community/pixtral-12b",
|
|
63
|
-
inference_framework: "transformers",
|
|
64
|
-
response_format: "markdown",
|
|
65
|
-
transformers_model_type: "automodel-vision2seq",
|
|
66
|
-
description: "Pixtral 12B (Transformers, Mistral)"
|
|
67
|
-
},
|
|
68
|
-
got2: {
|
|
69
|
-
repo_id: "stepfun-ai/GOT-OCR-2.0-hf",
|
|
70
|
-
inference_framework: "transformers",
|
|
71
|
-
response_format: "markdown",
|
|
72
|
-
transformers_model_type: "automodel-vision2seq",
|
|
73
|
-
description: "GOT-OCR 2.0 (StepFun, OCR-specialized)"
|
|
74
|
-
},
|
|
75
|
-
"gemma3-12B-mlx": {
|
|
76
|
-
repo_id: "mlx-community/gemma-3-12b-it-bf16",
|
|
77
|
-
inference_framework: "mlx",
|
|
78
|
-
response_format: "markdown",
|
|
79
|
-
transformers_model_type: "automodel-vision2seq",
|
|
80
|
-
description: "Gemma 3 12B (MLX, Google)"
|
|
81
|
-
},
|
|
82
|
-
"gemma3-27B-mlx": {
|
|
83
|
-
repo_id: "mlx-community/gemma-3-27b-it-bf16",
|
|
84
|
-
inference_framework: "mlx",
|
|
85
|
-
response_format: "markdown",
|
|
86
|
-
transformers_model_type: "automodel-vision2seq",
|
|
87
|
-
description: "Gemma 3 27B (MLX, Google, highest accuracy)"
|
|
88
|
-
},
|
|
89
|
-
dolphin: {
|
|
90
|
-
repo_id: "ByteDance/Dolphin",
|
|
91
|
-
inference_framework: "transformers",
|
|
92
|
-
response_format: "markdown",
|
|
93
|
-
transformers_model_type: "automodel-vision2seq",
|
|
94
|
-
description: "Dolphin (ByteDance, document-oriented)"
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
var DEFAULT_VLM_MODEL = "granite-docling-258M-mlx";
|
|
98
|
-
function resolveVlmModel(model) {
|
|
99
|
-
if (typeof model === "string") {
|
|
100
|
-
const preset = VLM_MODELS[model];
|
|
101
|
-
if (!preset) {
|
|
102
|
-
throw new Error(
|
|
103
|
-
`Unknown VLM model preset: "${model}". Available presets: ${Object.keys(VLM_MODELS).join(", ")}`
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
return {
|
|
107
|
-
repo_id: preset.repo_id,
|
|
108
|
-
inference_framework: preset.inference_framework,
|
|
109
|
-
response_format: preset.response_format,
|
|
110
|
-
transformers_model_type: preset.transformers_model_type
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
return model;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export {
|
|
117
|
-
VLM_MODELS,
|
|
118
|
-
DEFAULT_VLM_MODEL,
|
|
119
|
-
resolveVlmModel
|
|
120
|
-
};
|
|
121
|
-
//# sourceMappingURL=chunk-WWNI354M.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/vlm-models.ts"],"sourcesContent":["import type { VlmModelLocal } from 'docling-sdk';\n\n/**\n * VLM model preset with description\n */\nexport interface VlmModelPreset {\n repo_id: string;\n inference_framework: 'mlx' | 'transformers';\n response_format: 'doctags' | 'markdown';\n transformers_model_type: 'automodel-vision2seq' | 'automodel';\n description: string;\n}\n\n/**\n * Available VLM model presets\n *\n * Based on Docling's official VLM model specs:\n * https://docling-project.github.io/docling/usage/vision_models/#available-local-models\n *\n * Users can select a preset key or provide a custom VlmModelLocal object.\n */\nexport const VLM_MODELS: Record<string, VlmModelPreset> = {\n // ── DocTags models (specialized document structure output) ──────────\n\n 'granite-docling-258M-mlx': {\n repo_id: 'ibm-granite/granite-docling-258M-mlx',\n inference_framework: 'mlx',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description:\n 'Granite Docling 258M (MLX, Apple Silicon optimized, ~6s/page)',\n },\n 'granite-docling-258M': {\n repo_id: 'ibm-granite/granite-docling-258M',\n inference_framework: 'transformers',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Granite Docling 258M (Transformers, cross-platform)',\n },\n 'smoldocling-256M-mlx': {\n repo_id: 'docling-project/SmolDocling-256M-preview-mlx-bf16',\n inference_framework: 'mlx',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description: 'SmolDocling 256M (MLX, fastest option)',\n },\n 'smoldocling-256M': {\n repo_id: 'docling-project/SmolDocling-256M-preview',\n inference_framework: 'transformers',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description: 'SmolDocling 256M (Transformers)',\n },\n\n // ── Markdown models (general-purpose vision LLMs) ──────────────────\n\n 'granite-vision-2B': {\n repo_id: 'ibm-granite/granite-vision-3.2-2b',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Granite Vision 3.2 2B (IBM, higher accuracy)',\n },\n 'qwen25-vl-3B-mlx': {\n repo_id: 'mlx-community/Qwen2.5-VL-3B-Instruct-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Qwen 2.5 VL 3B (MLX, multilingual, good KCJ support)',\n },\n phi4: {\n repo_id: 'microsoft/Phi-4-multimodal-instruct',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel',\n description: 'Phi-4 Multimodal (Microsoft, CausalLM)',\n },\n 'pixtral-12B-mlx': {\n repo_id: 'mlx-community/pixtral-12b-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Pixtral 12B (MLX, Mistral, high accuracy)',\n },\n 'pixtral-12B': {\n repo_id: 'mistral-community/pixtral-12b',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Pixtral 12B (Transformers, Mistral)',\n },\n got2: {\n repo_id: 'stepfun-ai/GOT-OCR-2.0-hf',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'GOT-OCR 2.0 (StepFun, OCR-specialized)',\n },\n 'gemma3-12B-mlx': {\n repo_id: 'mlx-community/gemma-3-12b-it-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Gemma 3 12B (MLX, Google)',\n },\n 'gemma3-27B-mlx': {\n repo_id: 'mlx-community/gemma-3-27b-it-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Gemma 3 27B (MLX, Google, highest accuracy)',\n },\n dolphin: {\n repo_id: 'ByteDance/Dolphin',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Dolphin (ByteDance, document-oriented)',\n },\n} as const;\n\n/**\n * Default VLM model preset key\n */\nexport const DEFAULT_VLM_MODEL = 'granite-docling-258M-mlx';\n\n/**\n * Resolve a VLM model from a preset key or custom VlmModelLocal object.\n *\n * When using a preset key, only required fields are populated.\n * Optional fields (prompt, scale, extra_generation_config) use Docling defaults.\n */\nexport function resolveVlmModel(model: string | VlmModelLocal): VlmModelLocal {\n if (typeof model === 'string') {\n const preset = VLM_MODELS[model];\n if (!preset) {\n throw new Error(\n `Unknown VLM model preset: \"${model}\". Available presets: ${Object.keys(VLM_MODELS).join(', ')}`,\n );\n }\n return {\n repo_id: preset.repo_id,\n inference_framework: preset.inference_framework,\n response_format: preset.response_format,\n transformers_model_type: preset.transformers_model_type,\n } as VlmModelLocal;\n }\n return model;\n}\n"],"mappings":";AAqBO,IAAM,aAA6C;AAAA;AAAA,EAGxD,4BAA4B;AAAA,IAC1B,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aACE;AAAA,EACJ;AAAA,EACA,wBAAwB;AAAA,IACtB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,wBAAwB;AAAA,IACtB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,oBAAoB;AAAA,IAClB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA;AAAA,EAIA,qBAAqB;AAAA,IACnB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,oBAAoB;AAAA,IAClB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,IACjB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,kBAAkB;AAAA,IAChB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,kBAAkB;AAAA,IAChB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AACF;AAKO,IAAM,oBAAoB;AAQ1B,SAAS,gBAAgB,OAA8C;AAC5E,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,SAAS,WAAW,KAAK;AAC/B,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI;AAAA,QACR,8BAA8B,KAAK,yBAAyB,OAAO,KAAK,UAAU,EAAE,KAAK,IAAI,CAAC;AAAA,MAChG;AAAA,IACF;AACA,WAAO;AAAA,MACL,SAAS,OAAO;AAAA,MAChB,qBAAqB,OAAO;AAAA,MAC5B,iBAAiB,OAAO;AAAA,MACxB,yBAAyB,OAAO;AAAA,IAClC;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
package/dist/token-HEEJ7XHP.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_token_error,
|
|
3
|
-
require_token_util
|
|
4
|
-
} from "./chunk-JVYF2SQS.js";
|
|
5
|
-
import {
|
|
6
|
-
__commonJS
|
|
7
|
-
} from "./chunk-VUNV25KB.js";
|
|
8
|
-
|
|
9
|
-
// ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
|
|
10
|
-
var require_token = __commonJS({
|
|
11
|
-
"../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var token_exports = {};
|
|
30
|
-
__export(token_exports, {
|
|
31
|
-
refreshToken: () => refreshToken
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(token_exports);
|
|
34
|
-
var import_token_error = require_token_error();
|
|
35
|
-
var import_token_util = require_token_util();
|
|
36
|
-
async function refreshToken() {
|
|
37
|
-
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
38
|
-
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
39
|
-
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
40
|
-
const authToken = await (0, import_token_util.getVercelCliToken)();
|
|
41
|
-
if (!authToken) {
|
|
42
|
-
throw new import_token_error.VercelOidcTokenError(
|
|
43
|
-
"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`"
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
if (!projectId) {
|
|
47
|
-
throw new import_token_error.VercelOidcTokenError(
|
|
48
|
-
"Failed to refresh OIDC token: Try re-linking your project with `vc link`"
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
52
|
-
if (!maybeToken) {
|
|
53
|
-
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
54
|
-
}
|
|
55
|
-
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
56
|
-
}
|
|
57
|
-
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
export default require_token();
|
|
63
|
-
//# sourceMappingURL=token-HEEJ7XHP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = await (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Try re-linking your project with `vc link`\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"],"mappings":";;;;;;;;;AAAA;AAAA;AACA,QAAI,YAAY,OAAO;AACvB,QAAI,mBAAmB,OAAO;AAC9B,QAAI,oBAAoB,OAAO;AAC/B,QAAI,eAAe,OAAO,UAAU;AACpC,QAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,eAAS,QAAQ;AACf,kBAAU,QAAQ,MAAM,EAAE,KAAK,IAAI,IAAI,GAAG,YAAY,KAAK,CAAC;AAAA,IAChE;AACA,QAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,UAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;AAClE,iBAAS,OAAO,kBAAkB,IAAI;AACpC,cAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ;AACzC,sBAAU,IAAI,KAAK,EAAE,KAAK,MAAM,KAAK,GAAG,GAAG,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK,WAAW,CAAC;AAAA,MACvH;AACA,aAAO;AAAA,IACT;AACA,QAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,QAAI,gBAAgB,CAAC;AACrB,aAAS,eAAe;AAAA,MACtB,cAAc,MAAM;AAAA,IACtB,CAAC;AACD,WAAO,UAAU,aAAa,aAAa;AAC3C,QAAI,qBAAqB;AACzB,QAAI,oBAAoB;AACxB,mBAAe,eAAe;AAC5B,YAAM,EAAE,WAAW,OAAO,KAAK,GAAG,kBAAkB,iBAAiB;AACrE,UAAI,cAAc,GAAG,kBAAkB,WAAW,SAAS;AAC3D,UAAI,CAAC,eAAe,GAAG,kBAAkB,YAAY,GAAG,kBAAkB,iBAAiB,WAAW,KAAK,CAAC,GAAG;AAC7G,cAAM,YAAY,OAAO,GAAG,kBAAkB,mBAAmB;AACjE,YAAI,CAAC,WAAW;AACd,gBAAM,IAAI,mBAAmB;AAAA,YAC3B;AAAA,UACF;AAAA,QACF;AACA,YAAI,CAAC,WAAW;AACd,gBAAM,IAAI,mBAAmB;AAAA,YAC3B;AAAA,UACF;AAAA,QACF;AACA,qBAAa,OAAO,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,MAAM;AACzF,YAAI,CAAC,YAAY;AACf,gBAAM,IAAI,mBAAmB,qBAAqB,8BAA8B;AAAA,QAClF;AACA,SAAC,GAAG,kBAAkB,WAAW,YAAY,SAAS;AAAA,MACxD;AACA,cAAQ,IAAI,oBAAoB,WAAW;AAC3C;AAAA,IACF;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/vlm-models.cjs
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/config/vlm-models.ts
|
|
21
|
-
var vlm_models_exports = {};
|
|
22
|
-
__export(vlm_models_exports, {
|
|
23
|
-
DEFAULT_VLM_MODEL: () => DEFAULT_VLM_MODEL,
|
|
24
|
-
VLM_MODELS: () => VLM_MODELS,
|
|
25
|
-
resolveVlmModel: () => resolveVlmModel
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(vlm_models_exports);
|
|
28
|
-
var VLM_MODELS = {
|
|
29
|
-
// ── DocTags models (specialized document structure output) ──────────
|
|
30
|
-
"granite-docling-258M-mlx": {
|
|
31
|
-
repo_id: "ibm-granite/granite-docling-258M-mlx",
|
|
32
|
-
inference_framework: "mlx",
|
|
33
|
-
response_format: "doctags",
|
|
34
|
-
transformers_model_type: "automodel-vision2seq",
|
|
35
|
-
description: "Granite Docling 258M (MLX, Apple Silicon optimized, ~6s/page)"
|
|
36
|
-
},
|
|
37
|
-
"granite-docling-258M": {
|
|
38
|
-
repo_id: "ibm-granite/granite-docling-258M",
|
|
39
|
-
inference_framework: "transformers",
|
|
40
|
-
response_format: "doctags",
|
|
41
|
-
transformers_model_type: "automodel-vision2seq",
|
|
42
|
-
description: "Granite Docling 258M (Transformers, cross-platform)"
|
|
43
|
-
},
|
|
44
|
-
"smoldocling-256M-mlx": {
|
|
45
|
-
repo_id: "docling-project/SmolDocling-256M-preview-mlx-bf16",
|
|
46
|
-
inference_framework: "mlx",
|
|
47
|
-
response_format: "doctags",
|
|
48
|
-
transformers_model_type: "automodel-vision2seq",
|
|
49
|
-
description: "SmolDocling 256M (MLX, fastest option)"
|
|
50
|
-
},
|
|
51
|
-
"smoldocling-256M": {
|
|
52
|
-
repo_id: "docling-project/SmolDocling-256M-preview",
|
|
53
|
-
inference_framework: "transformers",
|
|
54
|
-
response_format: "doctags",
|
|
55
|
-
transformers_model_type: "automodel-vision2seq",
|
|
56
|
-
description: "SmolDocling 256M (Transformers)"
|
|
57
|
-
},
|
|
58
|
-
// ── Markdown models (general-purpose vision LLMs) ──────────────────
|
|
59
|
-
"granite-vision-2B": {
|
|
60
|
-
repo_id: "ibm-granite/granite-vision-3.2-2b",
|
|
61
|
-
inference_framework: "transformers",
|
|
62
|
-
response_format: "markdown",
|
|
63
|
-
transformers_model_type: "automodel-vision2seq",
|
|
64
|
-
description: "Granite Vision 3.2 2B (IBM, higher accuracy)"
|
|
65
|
-
},
|
|
66
|
-
"qwen25-vl-3B-mlx": {
|
|
67
|
-
repo_id: "mlx-community/Qwen2.5-VL-3B-Instruct-bf16",
|
|
68
|
-
inference_framework: "mlx",
|
|
69
|
-
response_format: "markdown",
|
|
70
|
-
transformers_model_type: "automodel-vision2seq",
|
|
71
|
-
description: "Qwen 2.5 VL 3B (MLX, multilingual, good KCJ support)"
|
|
72
|
-
},
|
|
73
|
-
phi4: {
|
|
74
|
-
repo_id: "microsoft/Phi-4-multimodal-instruct",
|
|
75
|
-
inference_framework: "transformers",
|
|
76
|
-
response_format: "markdown",
|
|
77
|
-
transformers_model_type: "automodel",
|
|
78
|
-
description: "Phi-4 Multimodal (Microsoft, CausalLM)"
|
|
79
|
-
},
|
|
80
|
-
"pixtral-12B-mlx": {
|
|
81
|
-
repo_id: "mlx-community/pixtral-12b-bf16",
|
|
82
|
-
inference_framework: "mlx",
|
|
83
|
-
response_format: "markdown",
|
|
84
|
-
transformers_model_type: "automodel-vision2seq",
|
|
85
|
-
description: "Pixtral 12B (MLX, Mistral, high accuracy)"
|
|
86
|
-
},
|
|
87
|
-
"pixtral-12B": {
|
|
88
|
-
repo_id: "mistral-community/pixtral-12b",
|
|
89
|
-
inference_framework: "transformers",
|
|
90
|
-
response_format: "markdown",
|
|
91
|
-
transformers_model_type: "automodel-vision2seq",
|
|
92
|
-
description: "Pixtral 12B (Transformers, Mistral)"
|
|
93
|
-
},
|
|
94
|
-
got2: {
|
|
95
|
-
repo_id: "stepfun-ai/GOT-OCR-2.0-hf",
|
|
96
|
-
inference_framework: "transformers",
|
|
97
|
-
response_format: "markdown",
|
|
98
|
-
transformers_model_type: "automodel-vision2seq",
|
|
99
|
-
description: "GOT-OCR 2.0 (StepFun, OCR-specialized)"
|
|
100
|
-
},
|
|
101
|
-
"gemma3-12B-mlx": {
|
|
102
|
-
repo_id: "mlx-community/gemma-3-12b-it-bf16",
|
|
103
|
-
inference_framework: "mlx",
|
|
104
|
-
response_format: "markdown",
|
|
105
|
-
transformers_model_type: "automodel-vision2seq",
|
|
106
|
-
description: "Gemma 3 12B (MLX, Google)"
|
|
107
|
-
},
|
|
108
|
-
"gemma3-27B-mlx": {
|
|
109
|
-
repo_id: "mlx-community/gemma-3-27b-it-bf16",
|
|
110
|
-
inference_framework: "mlx",
|
|
111
|
-
response_format: "markdown",
|
|
112
|
-
transformers_model_type: "automodel-vision2seq",
|
|
113
|
-
description: "Gemma 3 27B (MLX, Google, highest accuracy)"
|
|
114
|
-
},
|
|
115
|
-
dolphin: {
|
|
116
|
-
repo_id: "ByteDance/Dolphin",
|
|
117
|
-
inference_framework: "transformers",
|
|
118
|
-
response_format: "markdown",
|
|
119
|
-
transformers_model_type: "automodel-vision2seq",
|
|
120
|
-
description: "Dolphin (ByteDance, document-oriented)"
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
var DEFAULT_VLM_MODEL = "granite-docling-258M-mlx";
|
|
124
|
-
function resolveVlmModel(model) {
|
|
125
|
-
if (typeof model === "string") {
|
|
126
|
-
const preset = VLM_MODELS[model];
|
|
127
|
-
if (!preset) {
|
|
128
|
-
throw new Error(
|
|
129
|
-
`Unknown VLM model preset: "${model}". Available presets: ${Object.keys(VLM_MODELS).join(", ")}`
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
repo_id: preset.repo_id,
|
|
134
|
-
inference_framework: preset.inference_framework,
|
|
135
|
-
response_format: preset.response_format,
|
|
136
|
-
transformers_model_type: preset.transformers_model_type
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
return model;
|
|
140
|
-
}
|
|
141
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
142
|
-
0 && (module.exports = {
|
|
143
|
-
DEFAULT_VLM_MODEL,
|
|
144
|
-
VLM_MODELS,
|
|
145
|
-
resolveVlmModel
|
|
146
|
-
});
|
|
147
|
-
//# sourceMappingURL=vlm-models.cjs.map
|
package/dist/vlm-models.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/vlm-models.ts"],"sourcesContent":["import type { VlmModelLocal } from 'docling-sdk';\n\n/**\n * VLM model preset with description\n */\nexport interface VlmModelPreset {\n repo_id: string;\n inference_framework: 'mlx' | 'transformers';\n response_format: 'doctags' | 'markdown';\n transformers_model_type: 'automodel-vision2seq' | 'automodel';\n description: string;\n}\n\n/**\n * Available VLM model presets\n *\n * Based on Docling's official VLM model specs:\n * https://docling-project.github.io/docling/usage/vision_models/#available-local-models\n *\n * Users can select a preset key or provide a custom VlmModelLocal object.\n */\nexport const VLM_MODELS: Record<string, VlmModelPreset> = {\n // ── DocTags models (specialized document structure output) ──────────\n\n 'granite-docling-258M-mlx': {\n repo_id: 'ibm-granite/granite-docling-258M-mlx',\n inference_framework: 'mlx',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description:\n 'Granite Docling 258M (MLX, Apple Silicon optimized, ~6s/page)',\n },\n 'granite-docling-258M': {\n repo_id: 'ibm-granite/granite-docling-258M',\n inference_framework: 'transformers',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Granite Docling 258M (Transformers, cross-platform)',\n },\n 'smoldocling-256M-mlx': {\n repo_id: 'docling-project/SmolDocling-256M-preview-mlx-bf16',\n inference_framework: 'mlx',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description: 'SmolDocling 256M (MLX, fastest option)',\n },\n 'smoldocling-256M': {\n repo_id: 'docling-project/SmolDocling-256M-preview',\n inference_framework: 'transformers',\n response_format: 'doctags',\n transformers_model_type: 'automodel-vision2seq',\n description: 'SmolDocling 256M (Transformers)',\n },\n\n // ── Markdown models (general-purpose vision LLMs) ──────────────────\n\n 'granite-vision-2B': {\n repo_id: 'ibm-granite/granite-vision-3.2-2b',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Granite Vision 3.2 2B (IBM, higher accuracy)',\n },\n 'qwen25-vl-3B-mlx': {\n repo_id: 'mlx-community/Qwen2.5-VL-3B-Instruct-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Qwen 2.5 VL 3B (MLX, multilingual, good KCJ support)',\n },\n phi4: {\n repo_id: 'microsoft/Phi-4-multimodal-instruct',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel',\n description: 'Phi-4 Multimodal (Microsoft, CausalLM)',\n },\n 'pixtral-12B-mlx': {\n repo_id: 'mlx-community/pixtral-12b-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Pixtral 12B (MLX, Mistral, high accuracy)',\n },\n 'pixtral-12B': {\n repo_id: 'mistral-community/pixtral-12b',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Pixtral 12B (Transformers, Mistral)',\n },\n got2: {\n repo_id: 'stepfun-ai/GOT-OCR-2.0-hf',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'GOT-OCR 2.0 (StepFun, OCR-specialized)',\n },\n 'gemma3-12B-mlx': {\n repo_id: 'mlx-community/gemma-3-12b-it-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Gemma 3 12B (MLX, Google)',\n },\n 'gemma3-27B-mlx': {\n repo_id: 'mlx-community/gemma-3-27b-it-bf16',\n inference_framework: 'mlx',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Gemma 3 27B (MLX, Google, highest accuracy)',\n },\n dolphin: {\n repo_id: 'ByteDance/Dolphin',\n inference_framework: 'transformers',\n response_format: 'markdown',\n transformers_model_type: 'automodel-vision2seq',\n description: 'Dolphin (ByteDance, document-oriented)',\n },\n} as const;\n\n/**\n * Default VLM model preset key\n */\nexport const DEFAULT_VLM_MODEL = 'granite-docling-258M-mlx';\n\n/**\n * Resolve a VLM model from a preset key or custom VlmModelLocal object.\n *\n * When using a preset key, only required fields are populated.\n * Optional fields (prompt, scale, extra_generation_config) use Docling defaults.\n */\nexport function resolveVlmModel(model: string | VlmModelLocal): VlmModelLocal {\n if (typeof model === 'string') {\n const preset = VLM_MODELS[model];\n if (!preset) {\n throw new Error(\n `Unknown VLM model preset: \"${model}\". Available presets: ${Object.keys(VLM_MODELS).join(', ')}`,\n );\n }\n return {\n repo_id: preset.repo_id,\n inference_framework: preset.inference_framework,\n response_format: preset.response_format,\n transformers_model_type: preset.transformers_model_type,\n } as VlmModelLocal;\n }\n return model;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,IAAM,aAA6C;AAAA;AAAA,EAGxD,4BAA4B;AAAA,IAC1B,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aACE;AAAA,EACJ;AAAA,EACA,wBAAwB;AAAA,IACtB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,wBAAwB;AAAA,IACtB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,oBAAoB;AAAA,IAClB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA;AAAA,EAIA,qBAAqB;AAAA,IACnB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,oBAAoB;AAAA,IAClB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,mBAAmB;AAAA,IACjB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,kBAAkB;AAAA,IAChB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,kBAAkB;AAAA,IAChB,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,aAAa;AAAA,EACf;AACF;AAKO,IAAM,oBAAoB;AAQ1B,SAAS,gBAAgB,OAA8C;AAC5E,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,SAAS,WAAW,KAAK;AAC/B,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI;AAAA,QACR,8BAA8B,KAAK,yBAAyB,OAAO,KAAK,UAAU,EAAE,KAAK,IAAI,CAAC;AAAA,MAChG;AAAA,IACF;AACA,WAAO;AAAA,MACL,SAAS,OAAO;AAAA,MAChB,qBAAqB,OAAO;AAAA,MAC5B,iBAAiB,OAAO;AAAA,MACxB,yBAAyB,OAAO;AAAA,IAClC;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
package/dist/vlm-models.d.cts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { VlmModelLocal } from 'docling-sdk';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* VLM model preset with description
|
|
5
|
-
*/
|
|
6
|
-
interface VlmModelPreset {
|
|
7
|
-
repo_id: string;
|
|
8
|
-
inference_framework: 'mlx' | 'transformers';
|
|
9
|
-
response_format: 'doctags' | 'markdown';
|
|
10
|
-
transformers_model_type: 'automodel-vision2seq' | 'automodel';
|
|
11
|
-
description: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Available VLM model presets
|
|
15
|
-
*
|
|
16
|
-
* Based on Docling's official VLM model specs:
|
|
17
|
-
* https://docling-project.github.io/docling/usage/vision_models/#available-local-models
|
|
18
|
-
*
|
|
19
|
-
* Users can select a preset key or provide a custom VlmModelLocal object.
|
|
20
|
-
*/
|
|
21
|
-
declare const VLM_MODELS: Record<string, VlmModelPreset>;
|
|
22
|
-
/**
|
|
23
|
-
* Default VLM model preset key
|
|
24
|
-
*/
|
|
25
|
-
declare const DEFAULT_VLM_MODEL = "granite-docling-258M-mlx";
|
|
26
|
-
/**
|
|
27
|
-
* Resolve a VLM model from a preset key or custom VlmModelLocal object.
|
|
28
|
-
*
|
|
29
|
-
* When using a preset key, only required fields are populated.
|
|
30
|
-
* Optional fields (prompt, scale, extra_generation_config) use Docling defaults.
|
|
31
|
-
*/
|
|
32
|
-
declare function resolveVlmModel(model: string | VlmModelLocal): VlmModelLocal;
|
|
33
|
-
|
|
34
|
-
export { DEFAULT_VLM_MODEL, VLM_MODELS, type VlmModelPreset, resolveVlmModel };
|
package/dist/vlm-models.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { VlmModelLocal } from 'docling-sdk';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* VLM model preset with description
|
|
5
|
-
*/
|
|
6
|
-
interface VlmModelPreset {
|
|
7
|
-
repo_id: string;
|
|
8
|
-
inference_framework: 'mlx' | 'transformers';
|
|
9
|
-
response_format: 'doctags' | 'markdown';
|
|
10
|
-
transformers_model_type: 'automodel-vision2seq' | 'automodel';
|
|
11
|
-
description: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Available VLM model presets
|
|
15
|
-
*
|
|
16
|
-
* Based on Docling's official VLM model specs:
|
|
17
|
-
* https://docling-project.github.io/docling/usage/vision_models/#available-local-models
|
|
18
|
-
*
|
|
19
|
-
* Users can select a preset key or provide a custom VlmModelLocal object.
|
|
20
|
-
*/
|
|
21
|
-
declare const VLM_MODELS: Record<string, VlmModelPreset>;
|
|
22
|
-
/**
|
|
23
|
-
* Default VLM model preset key
|
|
24
|
-
*/
|
|
25
|
-
declare const DEFAULT_VLM_MODEL = "granite-docling-258M-mlx";
|
|
26
|
-
/**
|
|
27
|
-
* Resolve a VLM model from a preset key or custom VlmModelLocal object.
|
|
28
|
-
*
|
|
29
|
-
* When using a preset key, only required fields are populated.
|
|
30
|
-
* Optional fields (prompt, scale, extra_generation_config) use Docling defaults.
|
|
31
|
-
*/
|
|
32
|
-
declare function resolveVlmModel(model: string | VlmModelLocal): VlmModelLocal;
|
|
33
|
-
|
|
34
|
-
export { DEFAULT_VLM_MODEL, VLM_MODELS, type VlmModelPreset, resolveVlmModel };
|
package/dist/vlm-models.js
DELETED
package/dist/vlm-models.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|