|
7 | 7 | MODEL_ALGORITHM,
|
8 | 8 | PRETRAINED_MODEL_FORMAT,
|
9 | 9 | PretrainedSentenceTransformer,
|
| 10 | + PretrainedSparseEncodingModel, |
10 | 11 | WORKFLOW_STATE,
|
11 | 12 | } from './interfaces';
|
12 | 13 |
|
@@ -61,11 +62,15 @@ export const CREATE_INGEST_PIPELINE_STEP_TYPE = 'create_ingest_pipeline';
|
61 | 62 | export const CREATE_INDEX_STEP_TYPE = 'create_index';
|
62 | 63 | export const REGISTER_LOCAL_PRETRAINED_MODEL_STEP_TYPE =
|
63 | 64 | 'register_local_pretrained_model';
|
| 65 | +export const REGISTER_LOCAL_SPARSE_ENCODING_MODEL_STEP_TYPE = |
| 66 | + 'register_local_sparse_encoding_model'; |
64 | 67 |
|
65 | 68 | /**
|
66 | 69 | * ML PLUGIN PRETRAINED MODELS
|
67 |
| - * (based off of https://opensearch.org/docs/latest/ml-commons-plugin/pretrained-models/#sentence-transformers) |
| 70 | + * (based off of https://opensearch.org/docs/latest/ml-commons-plugin/pretrained-models) |
68 | 71 | */
|
| 72 | + |
| 73 | +// ---- SENTENCE TRANSFORMERS ---- |
69 | 74 | export const ROBERTA_SENTENCE_TRANSFORMER = {
|
70 | 75 | name: 'huggingface/sentence-transformers/all-distilroberta-v1',
|
71 | 76 | shortenedName: 'all-distilroberta-v1',
|
@@ -96,6 +101,34 @@ export const BERT_SENTENCE_TRANSFORMER = {
|
96 | 101 | vectorDimensions: 768,
|
97 | 102 | } as PretrainedSentenceTransformer;
|
98 | 103 |
|
| 104 | +// ---- SPARSE ENCODERS ---- |
| 105 | +export const NEURAL_SPARSE_TRANSFORMER = { |
| 106 | + name: 'amazon/neural-sparse/opensearch-neural-sparse-encoding-v1', |
| 107 | + shortenedName: 'opensearch-neural-sparse-encoding-v1', |
| 108 | + description: 'A general neural sparse encoding model', |
| 109 | + format: PRETRAINED_MODEL_FORMAT.TORCH_SCRIPT, |
| 110 | + algorithm: MODEL_ALGORITHM.SPARSE_ENCODING, |
| 111 | + version: '1.0.1', |
| 112 | +} as PretrainedSparseEncodingModel; |
| 113 | + |
| 114 | +export const NEURAL_SPARSE_DOC_TRANSFORMER = { |
| 115 | + name: 'amazon/neural-sparse/opensearch-neural-sparse-encoding-doc-v1', |
| 116 | + shortenedName: 'opensearch-neural-sparse-encoding-doc-v1', |
| 117 | + description: 'A general neural sparse encoding model', |
| 118 | + format: PRETRAINED_MODEL_FORMAT.TORCH_SCRIPT, |
| 119 | + algorithm: MODEL_ALGORITHM.SPARSE_ENCODING, |
| 120 | + version: '1.0.1', |
| 121 | +} as PretrainedSparseEncodingModel; |
| 122 | + |
| 123 | +export const NEURAL_SPARSE_TOKENIZER_TRANSFORMER = { |
| 124 | + name: 'amazon/neural-sparse/opensearch-neural-sparse-tokenizer-v1', |
| 125 | + shortenedName: 'opensearch-neural-sparse-tokenizer-v1', |
| 126 | + description: 'A neural sparse tokenizer model', |
| 127 | + format: PRETRAINED_MODEL_FORMAT.TORCH_SCRIPT, |
| 128 | + algorithm: MODEL_ALGORITHM.SPARSE_ENCODING, |
| 129 | + version: '1.0.1', |
| 130 | +} as PretrainedSparseEncodingModel; |
| 131 | + |
99 | 132 | /**
|
100 | 133 | * MISCELLANEOUS
|
101 | 134 | */
|
|
0 commit comments