Skip to content

Commit 064db42

Browse files
Merge branch 'main' into add-link-to-local-chat
2 parents b9f19e1 + a418861 commit 064db42

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

packages/tasks/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@huggingface/tasks",
33
"packageManager": "[email protected]",
4-
"version": "0.13.8",
4+
"version": "0.13.9",
55
"description": "List of ML tasks for huggingface.co/tasks",
66
"repository": "https://github.com/huggingface/huggingface.js.git",
77
"publishConfig": {

packages/tasks/src/tasks/table-question-answering/inference.ts

+25-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ export interface TableQuestionAnsweringInput {
1414
/**
1515
* Additional inference parameters for Table Question Answering
1616
*/
17-
parameters?: {
18-
[key: string]: unknown;
19-
};
17+
parameters?: TableQuestionAnsweringParameters;
2018
[property: string]: unknown;
2119
}
2220
/**
@@ -35,6 +33,30 @@ export interface TableQuestionAnsweringInputData {
3533
};
3634
[property: string]: unknown;
3735
}
36+
/**
37+
* Additional inference parameters for Table Question Answering
38+
*/
39+
export interface TableQuestionAnsweringParameters {
40+
/**
41+
* Activates and controls padding.
42+
*/
43+
padding?: Padding;
44+
/**
45+
* Whether to do inference sequentially or as a batch. Batching is faster, but models like
46+
* SQA require the inference to be done sequentially to extract relations within sequences,
47+
* given their conversational nature.
48+
*/
49+
sequential?: boolean;
50+
/**
51+
* Activates and controls truncation.
52+
*/
53+
truncation?: boolean;
54+
[property: string]: unknown;
55+
}
56+
/**
57+
* Activates and controls padding.
58+
*/
59+
export type Padding = "do_not_pad" | "longest" | "max_length";
3860
export type TableQuestionAnsweringOutput = TableQuestionAnsweringOutputElement[];
3961
/**
4062
* Outputs of inference for the Table Question Answering task

packages/tasks/src/tasks/table-question-answering/spec/input.json

+18-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,24 @@
3636
"TableQuestionAnsweringParameters": {
3737
"title": "TableQuestionAnsweringParameters",
3838
"type": "object",
39-
"properties": {}
39+
"properties": {
40+
"padding": {
41+
"type": "string",
42+
"default": "do_not_pad",
43+
"description": "Activates and controls padding.",
44+
"enum": ["do_not_pad", "longest", "max_length"]
45+
},
46+
"sequential": {
47+
"type": "boolean",
48+
"default": "false",
49+
"description": "Whether to do inference sequentially or as a batch. Batching is faster, but models like SQA require the inference to be done sequentially to extract relations within sequences, given their conversational nature.",
50+
},
51+
"truncation": {
52+
"type": "boolean",
53+
"default": "false",
54+
"description": "Activates and controls truncation.",
55+
}
56+
}
4057
}
4158
},
4259
"required": ["inputs"]

0 commit comments

Comments
 (0)