Skip to content

Commit 4013b9d

Browse files
as-suvorovyatarkan
andauthored
[RAG] Add text rerank models task (openvinotoolkit#2941)
## Description For text rerank models `--task` needs to be provided during conversion with `optimum-cli` <img width="986" height="728" alt="image" src="https://github.com/user-attachments/assets/291ef67a-a5cd-4ebf-99ab-ab1d12d465cc" /> <!--- Jira ticket number (e.g., 123). Delete if there's no ticket. Don't include full link or project name. --> Ticket: 173665 ## Checklist: - [x] I have made corresponding changes to the documentation --------- Co-authored-by: Yaroslav Tarkan <yaroslav.tarkan@intel.com>
1 parent c28322e commit 4013b9d

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

site/docs/supported-models/_components/text-rerank-models-table/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import { TEXT_RERANK_MODELS } from './models';
33
import { BaseModelsTable, LinksCell } from '../base-models-table';
44

55
export default function TextRerankModelsTable(): React.JSX.Element {
6-
const headers = ['Architecture', 'Example HuggingFace Models'];
6+
const headers = ['Architecture', '`optimum-cli` task', 'Example HuggingFace Models'];
77

8-
const rows = TEXT_RERANK_MODELS.map(({ architecture, models }) => (
8+
const rows = TEXT_RERANK_MODELS.map(({ architecture, optimumIntelTask, models }) => (
99
<>
1010
<tr key={architecture}>
1111
<td rowSpan={models.length}>
1212
<code>{architecture}</code>
1313
</td>
14+
<td rowSpan={models.length}>
15+
<code>{optimumIntelTask}</code>
16+
</td>
1417
<LinksCell links={models[0].links} />
1518
</tr>
1619
</>

site/docs/supported-models/_components/text-rerank-models-table/models.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
type TextRerankModelType = {
22
architecture: string;
3+
optimumIntelTask: string;
34
models: Array<{
45
links: string[];
56
}>;
@@ -8,6 +9,7 @@ type TextRerankModelType = {
89
export const TEXT_RERANK_MODELS: TextRerankModelType[] = [
910
{
1011
architecture: 'BertForSequenceClassification',
12+
optimumIntelTask: 'text-classification',
1113
models: [
1214
{
1315
links: [
@@ -23,6 +25,7 @@ export const TEXT_RERANK_MODELS: TextRerankModelType[] = [
2325
},
2426
{
2527
architecture: 'XLMRobertaForSequenceClassification',
28+
optimumIntelTask: 'text-classification',
2629
models: [
2730
{
2831
links: [
@@ -33,6 +36,7 @@ export const TEXT_RERANK_MODELS: TextRerankModelType[] = [
3336
},
3437
{
3538
architecture: 'ModernBertForSequenceClassification',
39+
optimumIntelTask: 'text-classification',
3640
models: [
3741
{
3842
links: [
@@ -45,6 +49,7 @@ export const TEXT_RERANK_MODELS: TextRerankModelType[] = [
4549
},
4650
{
4751
architecture: 'Qwen3ForCausalLM',
52+
optimumIntelTask: 'text-generation-with-past',
4853
models: [
4954
{
5055
links: [

site/docs/supported-models/index.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,11 @@ LoRA adapters are not supported.
105105
:::
106106

107107
:::info
108-
Qwen3 Rerank models require `--task text-generation-with-past` during the conversion with `optimum-cli`.
108+
Text Rerank models require appropriate `--task` provided during the conversion with `optimum-cli`. Task can be found in the table above.
109109
:::
110110

111111
:::info
112-
113112
Some models may require access request submission on the Hugging Face page to be downloaded.
114113

115114
If https://huggingface.co/ is down, the conversion step won't be able to download the models.
116-
117115
:::

0 commit comments

Comments
 (0)