You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`messageHistory`|`Message[]`| History containing all messages in conversation. This field is updated after model responds to `sendMessage`. |
143
-
|`response`|`string`| State of the generated response. This field is updated with each token generated by the model. |
144
-
|`isReady`|`boolean`| Indicates whether the model is ready. |
145
-
|`isGenerating`|`boolean`| Indicates whether the model is currently generating a response. |
146
-
|`downloadProgress`|`number`| Represents the download progress as a value between 0 and 1, indicating the extent of the model file retrieval. |
147
-
|`error`| <code>string | null</code> | Contains the error message if the model failed to load. |
148
-
|`configure`|`({ chatConfig?: Partial<ChatConfig>, toolsConfig?: ToolsConfig }) => void`| Configures chat and tool calling. See more details in [configuring the model](#configuring-the-model). |
149
-
|`sendMessage`|`(message: string, tools?: LLMTool[]) => Promise<void>`| Method to add user message to conversation. After model responds, `messageHistory` will be updated with both user message and model response. |
150
-
|`deleteMessage`|`(index: number) => void`| Deletes all messages starting with message on `index` position. After deletion `messageHistory` will be updated. |
151
-
|`generate`|`(messages: Message[], tools?: LLMTool[]) => Promise<void>`| Runs model to complete chat passed in `messages` argument. It doesn't manage conversation context. |
152
-
|`forward`|`(input: string) => Promise<void>`| Runs model inference with raw input string. You need to provide entire conversation and prompt (in correct format and with special tokens!) in input string to this method. It doesn't manage conversation context. It is intended for users that need access to the model itself without any wrapper. If you want simple chat with model consider using `sendMessage`. |
153
-
|`interrupt`|`() => void`| Function to interrupt the current inference. |
|`messageHistory`|`Message[]`| History containing all messages in conversation. This field is updated after model responds to `sendMessage`. |
142
+
|`response`|`string`| State of the generated response. This field is updated with each token generated by the model. |
143
+
|`isReady`|`boolean`| Indicates whether the model is ready. |
144
+
|`isGenerating`|`boolean`| Indicates whether the model is currently generating a response. |
145
+
|`downloadProgress`|`number`| Represents the download progress as a value between 0 and 1, indicating the extent of the model file retrieval. |
146
+
|`error`| <code>string | null</code> | Contains the error message if the model failed to load. |
147
+
|`configure`|`({ chatConfig?: Partial<ChatConfig>, toolsConfig?: ToolsConfig }) => void`| Configures chat and tool calling. See more details in [configuring the model](#configuring-the-model). |
148
+
|`sendMessage`|`(message: string, tools?: LLMTool[]) => Promise<void>`| Method to add user message to conversation. After model responds, `messageHistory` will be updated with both user message and model response. |
149
+
|`deleteMessage`|`(index: number) => void`| Deletes all messages starting with message on `index` position. After deletion `messageHistory` will be updated. |
150
+
|`generate`|`(messages: Message[], tools?: LLMTool[]) => Promise<void>`| Runs model to complete chat passed in `messages` argument. It doesn't manage conversation context. |
151
+
|`interrupt`|`() => void`| Function to interrupt the current inference. |
|[all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)| English | 256 | 384 | All-round model tuned for many use-cases. Trained on a large and diverse dataset of over 1 billion training pairs. |
116
+
|[all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)| English | 384 | 768 | All-round model tuned for many use-cases. Trained on a large and diverse dataset of over 1 billion training pairs. |
117
+
|[multi-qa-MiniLM-L6-cos-v1](https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1)| English | 511 | 384 | This model was tuned for semantic search: Given a query/question, it can find relevant passages. It was trained on a large and diverse set of (question, answer) pairs. |
118
+
|[multi-qa-mpnet-base-dot-v1](https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-dot-v1)| English | 512 | 768 | This model was tuned for semantic search: Given a query/question, it can find relevant passages. It was trained on a large and diverse set of (question, answer) pairs. |
116
119
117
120
**`Max Tokens`** - the maximum number of tokens that can be processed by the model. If the input text exceeds this limit, it will be truncated.
118
121
@@ -122,22 +125,31 @@ function App() {
122
125
123
126
### Model size
124
127
125
-
| Model | XNNPACK [MB]|
126
-
| ---------------- | :----------: |
127
-
| ALL_MINILM_L6_V2 | 91 |
128
+
| Model | XNNPACK [MB]|
129
+
| -------------------------- | :----------: |
130
+
| ALL_MINILM_L6_V2 | 91 |
131
+
| ALL_MPNET_BASE_V2 | 438 |
132
+
| MULTI_QA_MINILM_L6_COS_V1 | 91 |
133
+
| MULTI_QA_MPNET_BASE_DOT_V1 | 438 |
128
134
129
135
### Memory usage
130
136
131
-
| Model | Android (XNNPACK) [MB]| iOS (XNNPACK) [MB]|
Times presented in the tables are measured as consecutive runs of the model. Initial run times may be up to 2x longer due to model loading and initialization.
139
148
:::
140
149
141
-
| Model | iPhone 16 Pro (XNNPACK) [ms]| iPhone 14 Pro Max (XNNPACK) [ms]| iPhone SE 3 (XNNPACK) [ms]| Samsung Galaxy S24 (XNNPACK) | OnePlus 12 (XNNPACK) [ms]|
0 commit comments