diff --git a/.github/workflows/linux-build.yaml b/.github/workflows/linux-build.yaml
index 7597f5c8..99d08449 100644
--- a/.github/workflows/linux-build.yaml
+++ b/.github/workflows/linux-build.yaml
@@ -49,7 +49,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.24.0'
+ flutter-version: '3.24.5'
- name: Install dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libmpv-dev
- name: Install project dependencies
diff --git a/.github/workflows/macos-build.yaml b/.github/workflows/macos-build.yaml
index 1331f3b4..a2e966bd 100644
--- a/.github/workflows/macos-build.yaml
+++ b/.github/workflows/macos-build.yaml
@@ -21,7 +21,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.24.0'
+ flutter-version: '3.24.5'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
diff --git a/.github/workflows/windows-build.yaml b/.github/workflows/windows-build.yaml
index e0beccd2..440b880c 100644
--- a/.github/workflows/windows-build.yaml
+++ b/.github/workflows/windows-build.yaml
@@ -73,11 +73,12 @@ jobs:
# Step 9: Install vcpkg and ffmpeg
- name: Install vcpkg and ffmpeg
+ shell: powershell
run: |
- git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
+ if (!(Test-Path "C:\vcpkg")) { git clone https://github.com/microsoft/vcpkg.git C:\vcpkg }
C:\vcpkg\bootstrap-vcpkg.bat
- C:\vcpkg\vcpkg install ffmpeg
- shell: cmd
+ cd openvino_bindings/third_party
+ C:\vcpkg\vcpkg install
# Step 10: Download and Install OpenVINO Runtime
- name: Download and Install OpenVINO Runtime 24.5.0
@@ -126,7 +127,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.24.0'
+ flutter-version: '3.24.5'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
diff --git a/README.md b/README.md
index 56d085b5..84a26b94 100644
--- a/README.md
+++ b/README.md
@@ -1,31 +1,100 @@
+
+
# OpenVINO™ Test Drive
[![codecov](https://codecov.io/gh/openvinotoolkit/openvino_testdrive/graph/badge.svg?token=DH98FAPH65)](https://codecov.io/gh/openvinotoolkit/openvino_testdrive)
+[![openvino](https://img.shields.io/badge/openvino-2024.4-blue)]()
+
+
+
+Get started with OpenVINO™ Test Drive, an application that allows you to run generative AI and vision models trained by [Intel® Geti™](https://docs.geti.intel.com/) directly on your computer or edge device using [OpenVINO™ Runtime](https://github.com/openvinotoolkit/openvino).
+
+
+
+
+
+
+With use of OpenVINO™ Test Drive you can:
++ **Chat with LLMs** and evaluating model performance on your computer or edge device
++ **Experiment with different text prompts** to generate images using Stable Diffusion and Stable DiffusionXL models (coming soon)
++ **Transcribe speech from video** using Whisper models, including generation of timestamps (coming soon)
++ **Run and visualize results of models** trained by Intel® Geti™ using single image inference or batch inference mode
+
+## Installation
+
+Download the latest release from the [Releases repository](https://storage.openvinotoolkit.org/repositories/openvino_testdrive/packages/).
+
+> [!NOTE]
+> To verify downloaded file integrity, you can generate a SHA-256 of the downloaded file and compare it to the SHA-256 from corresponding `.sha256` file published in Releases repository.
+
+
+Installation on Windows
+
+1. Downloading the zip archive [Releases repository](https://storage.openvinotoolkit.org/repositories/openvino_testdrive/packages/) `Windows` folder .
+
+
+
+
+
+2. Extract zip archive double-click the MSIX installation package, click `Install` button and it will display the installation process
-Get started with OpenVINO Test Drive, an application that allows you to run LLMs and models trained by [Intel Geti](https://geti.intel.com/) directly on your computer or edge device using OpenVINO.
+
+
+
-# Features
-### LLM models
-+ **Text Generation**: Generate text and engage in chat experiences.
-+ **Performance metrics**: Evaluate model performance on your computer or edge device.
-### Computer vision models
-+ **Single Image Inference**: Perform inference on individual images.
-+ **Batch Inference**: Conduct inference on batches of images.
+3. Click on the application name on Windows app list to launch OpenVINO™ Test Drive.
-# High level architecture
-![Design Graph](./design_graph.png)
+
-# Using the Test Drive
+## Quick start
-Upon starting the application, you can import a model using either Huggingface for LLMs or “from local disk” for Geti models.
+Upon starting the application, you can import a model using either Hugging Face for LLMs or upload Intel® Geti™ models from local disk.
-![Preview](./preview.png)
+### Text generation and LLM performance evaluation
-# Getting Started
+1. Find a model on Hugging Face and import it
+
+
+
-## Release
+2. Chat with LLMs via `Playground` tab.
+
+
+
-Download the latest release from the [Releases page](https://github.com/openvinotoolkit/openvino_testdrive/releases).
+3. Use `Performance metrics` tab to get model performance metrics on your computer or edge device
+
+
+
+
+### Images inference with models trained by Intel® Geti™
+
+1. Download deployment code for the model in OpenVINO format trained by Intel® Geti™.
+
+
+
+
+
+> [!NOTE]
+> Please check [Intel® Geti™ documentation](https://docs.geti.intel.com) for more details.
+
+2. Import deployment code into OpenVINO™ Test Drive using `Import model` -> `Local disk` button.
+
+
+
+
+
+3. Run and visualize results of inference on individual images using `Live inference` tab.
+
+
+
+
+
+4. For batch inference, use `Batch inference` tab and provide paths to folder with input images in a `Source folder` and specify `Destination folder` for output batch inference results. Click on `Start` to start batch inference.
+
+
+
+
## Build
@@ -33,10 +102,21 @@ The application requires the flutter SDK and the dependencies for your specific
Secondly, the bindings and its dependencies for your platform to be added to `./bindings`.
1. [Install flutter sdk](https://docs.flutter.dev/get-started/install). Make sure to follow the guide for flutter dependencies.
-2. [Download the bindings](https://github.com/intel-sandbox/applications.ai.geti.flutter.inference/releases) and extract them to ./bindings folder
+2. Build the bindings and put them to `./bindings` folder. OpenVINO™ Test Drive uses bindings to OpenVINO™ GenAI and OpenVINO™ Vision ModelAPI located in `./openvino_bindings` folder. See [readme](./openvino_bindings/README.md) for more details.
3. Once done you can start the application: `flutter run`
-## Build bindings
+## Ecosystem
+
+- [OpenVINO™](https://github.com/openvinotoolkit/openvino) - software toolkit for optimizing and deploying deep learning models.
+- [GenAI Repository](https://github.com/openvinotoolkit/openvino.genai) and [OpenVINO Tokenizers](https://github.com/openvinotoolkit/openvino_tokenizers) - resources and tools for developing and optimizing Generative AI applications.
+- [Intel® Geti™](https://docs.geti.intel.com/) - software for building computer vision models.
+- [OpenVINO™ Vision ModelAPI](https://github.com/openvinotoolkit/model_api) - a set of wrapper classes for particular tasks and model architectures, simplifying data preprocess and postprocess as well as routine procedures.
+
+## Contributing
+
+For those who would like to contribute to the OpenVINO™ Test Drive, please check out [Contribution Guidelines](CONTRIBUTING.md) for more details.
-The Test Drive uses c bindings to OpenVINO. These are located in `./openvino_bindings` folder. See [readme.md](./openvino_bindings/README.md).
+## License
+OpenVINO™ Test Drive repository is licensed under [Apache License Version 2.0](LICENSE).
+By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
diff --git a/assets/manifest.json b/assets/manifest.json
index 10592396..50377b65 100644
--- a/assets/manifest.json
+++ b/assets/manifest.json
@@ -1,996 +1,1799 @@
{
"popular_models": [
{
- "name": "Mistral 7b Instruct",
+ "name": "Mistral 7b Instruct V0.1",
"id": "mistral-7b-instruct-v0.1-int8-ov",
- "fileSize": 7824223166,
+ "fileSize": 7824223238,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Mistral 7b Instruct V0.1 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7b Instruct V0.1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
- "name": "Phi 3 Mini 4k",
+ "name": "Phi 3 Mini 4k Instruct",
"id": "Phi-3-mini-4k-instruct-int4-ov",
- "fileSize": 2637358233,
+ "fileSize": 2317366276,
"optimizationPrecision": "int4",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Mini 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Whisper Base",
+ "id": "whisper-base-fp16-ov",
+ "fileSize": 263786768,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
},
{
"name": "Open_llama_3b_v2",
"id": "open_llama_3b_v2-int8-ov",
- "fileSize": 3689232132,
+ "fileSize": 3689232204,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Open_llama_3b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_3b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ }
+ ],
+ "all_models": [
+ {
+ "name": "Distil Large V2",
+ "id": "distil-large-v2-fp16-ov",
+ "fileSize": 1623693910,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Large V2",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
},
{
- "name": "Open_llama_3b_v2",
- "id": "open_llama_3b_v2-int8-ov",
- "fileSize": 3689232132,
+ "name": "Distil Large V2",
+ "id": "distil-large-v2-int8-ov",
+ "fileSize": 811967934,
"optimizationPrecision": "int8",
- "contextWindow": 2048,
- "description": "Chat with Open_llama_3b_v2 model",
- "task": "text-generation"
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Large V2",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
},
{
- "name": "Open_llama_3b_v2",
- "id": "open_llama_3b_v2-int8-ov",
- "fileSize": 3689232132,
+ "name": "Distil Large V3",
+ "id": "distil-large-v3-int4-ov",
+ "fileSize": 470886140,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Large V3",
+ "id": "distil-large-v3-fp16-ov",
+ "fileSize": 1623692375,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Large V3",
+ "id": "distil-large-v3-int8-ov",
+ "fileSize": 811966358,
"optimizationPrecision": "int8",
- "contextWindow": 2048,
- "description": "Chat with Open_llama_3b_v2 model",
- "task": "text-generation"
- }
- ],
- "all_models": [
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Large V2",
+ "id": "distil-large-v2-int4-ov",
+ "fileSize": 470887685,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Large V2",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Base",
+ "id": "distil-whisper-base-fp16-ov",
+ "fileSize": 160942998,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Base",
+ "id": "distil-whisper-base-int4-ov",
+ "fileSize": 66325080,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Base",
+ "id": "distil-whisper-base-int8-ov",
+ "fileSize": 88033050,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Large V3",
+ "id": "distil-whisper-large-v3-int4-ov",
+ "fileSize": 905249204,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Medium",
+ "id": "distil-whisper-medium-fp16-ov",
+ "fileSize": 1611734288,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Medium",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Large V3",
+ "id": "distil-whisper-large-v3-int8-ov",
+ "fileSize": 1642880457,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Large V3",
+ "id": "distil-whisper-large-v3-fp16-ov",
+ "fileSize": 3318535654,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Medium",
+ "id": "distil-whisper-medium-int4-ov",
+ "fileSize": 467835674,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Medium",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Medium",
+ "id": "distil-whisper-medium-int8-ov",
+ "fileSize": 820786325,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Medium",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Tiny",
+ "id": "distil-whisper-tiny-int4-ov",
+ "fileSize": 42419245,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Tiny",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Tiny",
+ "id": "distil-whisper-tiny-int8-ov",
+ "fileSize": 50341791,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Tiny",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Distil Whisper Tiny",
+ "id": "distil-whisper-tiny-fp16-ov",
+ "fileSize": 87657508,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Distil Whisper Tiny",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Tiny",
+ "id": "whisper-tiny-int4-ov",
+ "fileSize": 68582454,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Tiny",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Base",
+ "id": "whisper-base-int8-ov",
+ "fileSize": 140207692,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Medium",
+ "id": "whisper-medium-int8-ov",
+ "fileSize": 1250473365,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Medium",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Medium",
+ "id": "whisper-medium-int4-ov",
+ "fileSize": 719474580,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Medium",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Tiny",
+ "id": "whisper-tiny-int8-ov",
+ "fileSize": 80769346,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Tiny",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Base",
+ "id": "whisper-base-int4-ov",
+ "fileSize": 107331169,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Large V3",
+ "id": "whisper-large-v3-fp16-ov",
+ "fileSize": 5038558437,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Large V3",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Medium",
+ "id": "whisper-medium-fp16-ov",
+ "fileSize": 2465759114,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Medium",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Tiny",
+ "id": "whisper-tiny-fp16-ov",
+ "fileSize": 147388830,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Tiny",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
+ {
+ "name": "Whisper Base",
+ "id": "whisper-base-fp16-ov",
+ "fileSize": 263786768,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Transcribe video with Whisper Base",
+ "task": "speech",
+ "author": "OpenVINO",
+ "collection": "speech-to-text-672321d5c070537a178a8aeb"
+ },
{
"name": "Phi 2",
"id": "phi-2-fp16-ov",
- "fileSize": 5978786593,
+ "fileSize": 5978786613,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Phi 2 model",
- "task": "text-generation"
+ "description": "Chat with Phi 2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 2",
"id": "phi-2-int8-ov",
- "fileSize": 3004595529,
+ "fileSize": 3004595590,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Phi 2 model",
- "task": "text-generation"
+ "description": "Chat with Phi 2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mistral 7b Instruct V0.1",
"id": "mistral-7b-instruct-v0.1-int8-ov",
- "fileSize": 7824223166,
+ "fileSize": 7824223238,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Mistral 7b Instruct V0.1 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7b Instruct V0.1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mistral 7b Instruct V0.1",
"id": "mistral-7b-instruct-v0.1-fp16-ov",
- "fileSize": 15576387089,
+ "fileSize": 15576387130,
"optimizationPrecision": "fp16",
"contextWindow": 32768,
- "description": "Chat with Mistral 7b Instruct V0.1 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7b Instruct V0.1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mistral 7b Instruct V0.1",
"id": "mistral-7b-instruct-v0.1-int4-ov",
- "fileSize": 4967917794,
+ "fileSize": 4967917876,
"optimizationPrecision": "int4",
"contextWindow": 32768,
- "description": "Chat with Mistral 7b Instruct V0.1 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7b Instruct V0.1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Codegen25 7b Multi",
"id": "codegen25-7b-multi-fp16-ov",
- "fileSize": 14822539137,
+ "fileSize": 14822064608,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Codegen25 7b Multi model",
- "task": "text-generation"
+ "description": "Chat with Codegen25 7b Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Codegen25 7b Multi",
"id": "codegen25-7b-multi-int8-ov",
- "fileSize": 7414035410,
+ "fileSize": 7413624227,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Codegen25 7b Multi model",
- "task": "text-generation"
+ "description": "Chat with Codegen25 7b Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mixtral 8x7b Instruct V0.1",
"id": "mixtral-8x7b-instruct-v0.1-int4-ov",
- "fileSize": 30833964831,
+ "fileSize": 30833964913,
"optimizationPrecision": "int4",
"contextWindow": 32768,
- "description": "Chat with Mixtral 8x7b Instruct V0.1 model",
- "task": "text-generation"
+ "description": "Chat with Mixtral 8x7b Instruct V0.1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mixtral 8x7B Instruct V0.1",
"id": "Mixtral-8x7B-Instruct-v0.1-int8-ov",
- "fileSize": 50160688476,
+ "fileSize": 50160688558,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Mixtral 8x7B Instruct V0.1 model",
- "task": "text-generation"
+ "description": "Chat with Mixtral 8x7B Instruct V0.1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Notus 7b V1",
"id": "notus-7b-v1-fp16-ov",
- "fileSize": 15576386988,
+ "fileSize": 15576387018,
"optimizationPrecision": "fp16",
"contextWindow": 32768,
- "description": "Chat with Notus 7b V1 model",
- "task": "text-generation"
+ "description": "Chat with Notus 7b V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Notus 7b V1",
"id": "notus-7b-v1-int8-ov",
- "fileSize": 7803125798,
+ "fileSize": 7803125869,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Notus 7b V1 model",
- "task": "text-generation"
+ "description": "Chat with Notus 7b V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Neural Chat 7b V3 3",
"id": "neural-chat-7b-v3-3-fp16-ov",
- "fileSize": 15576386599,
+ "fileSize": 15576386640,
"optimizationPrecision": "fp16",
"contextWindow": 32768,
- "description": "Chat with Neural Chat 7b V3 3 model",
- "task": "text-generation"
+ "description": "Chat with Neural Chat 7b V3 3",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Neural Chat 7b V3 3",
"id": "neural-chat-7b-v3-3-int8-ov",
- "fileSize": 7803125410,
+ "fileSize": 7803125481,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Neural Chat 7b V3 3 model",
- "task": "text-generation"
+ "description": "Chat with Neural Chat 7b V3 3",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Zephyr 7b Beta",
"id": "zephyr-7b-beta-int8-ov",
- "fileSize": 7803126061,
+ "fileSize": 7803126133,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Zephyr 7b Beta model",
- "task": "text-generation"
+ "description": "Chat with Zephyr 7b Beta",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Zephyr 7b Beta",
"id": "zephyr-7b-beta-int4-ov",
- "fileSize": 4904138531,
+ "fileSize": 4904138613,
"optimizationPrecision": "int4",
"contextWindow": 32768,
- "description": "Chat with Zephyr 7b Beta model",
- "task": "text-generation"
+ "description": "Chat with Zephyr 7b Beta",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 3b",
"id": "dolly-v2-3b-int4-ov",
- "fileSize": 2434908470,
+ "fileSize": 1694037426,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 3b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 3b",
"id": "dolly-v2-3b-int8-ov",
- "fileSize": 2993180745,
+ "fileSize": 2993264386,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 3b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 3b",
"id": "dolly-v2-3b-fp16-ov",
- "fileSize": 5967078157,
+ "fileSize": 5967350336,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 3b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Codegen2 3_7B_P",
"id": "codegen2-3_7B_P-int4-ov",
- "fileSize": 2252764320,
+ "fileSize": 2252764402,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Codegen2 3_7B_P model",
- "task": "text-generation"
+ "description": "Chat with Codegen2 3_7B_P",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Codegen2 3_7B_P",
"id": "codegen2-3_7B_P-fp16-ov",
- "fileSize": 7835969716,
+ "fileSize": 7835969757,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Codegen2 3_7B_P model",
- "task": "text-generation"
+ "description": "Chat with Codegen2 3_7B_P",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Zephyr 7b Beta",
"id": "zephyr-7b-beta-fp16-ov",
- "fileSize": 15576387241,
+ "fileSize": 15576387282,
"optimizationPrecision": "fp16",
"contextWindow": 32768,
- "description": "Chat with Zephyr 7b Beta model",
- "task": "text-generation"
+ "description": "Chat with Zephyr 7b Beta",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Codegen2 3_7B_P",
"id": "codegen2-3_7B_P-int8-ov",
- "fileSize": 3927738589,
+ "fileSize": 3927738671,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Codegen2 3_7B_P model",
- "task": "text-generation"
+ "description": "Chat with Codegen2 3_7B_P",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "TinyLlama 1.1B Chat V1.0",
"id": "TinyLlama-1.1B-Chat-v1.0-fp16-ov",
- "fileSize": 2368272475,
+ "fileSize": 2368272527,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with TinyLlama 1.1B Chat V1.0 model",
- "task": "text-generation"
+ "description": "Chat with TinyLlama 1.1B Chat V1.0",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "TinyLlama 1.1B Chat V1.0",
"id": "TinyLlama-1.1B-Chat-v1.0-int4-ov",
- "fileSize": 668269097,
+ "fileSize": 668269179,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with TinyLlama 1.1B Chat V1.0 model",
- "task": "text-generation"
+ "description": "Chat with TinyLlama 1.1B Chat V1.0",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "TinyLlama 1.1B Chat V1.0",
"id": "TinyLlama-1.1B-Chat-v1.0-int8-ov",
- "fileSize": 1187586826,
+ "fileSize": 1187586908,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with TinyLlama 1.1B Chat V1.0 model",
- "task": "text-generation"
+ "description": "Chat with TinyLlama 1.1B Chat V1.0",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Gpt Neox 20b",
"id": "gpt-neox-20b-int8-ov",
- "fileSize": 22128276574,
+ "fileSize": 22128276646,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Gpt Neox 20b model",
- "task": "text-generation"
+ "description": "Chat with Gpt Neox 20b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Gpt Neox 20b",
"id": "gpt-neox-20b-fp16-ov",
- "fileSize": 44140098869,
+ "fileSize": 44140098910,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Gpt Neox 20b model",
- "task": "text-generation"
- },
- {
- "name": "Gpt Neox 20b",
- "id": "gpt-neox-20b-int4-ov",
- "fileSize": 13968006447,
- "optimizationPrecision": "int4",
- "contextWindow": 2048,
- "description": "Chat with Gpt Neox 20b model",
- "task": "text-generation"
+ "description": "Chat with Gpt Neox 20b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Gpt J 6b",
"id": "gpt-j-6b-int4-ov",
- "fileSize": 4196810211,
+ "fileSize": 4196810272,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Gpt J 6b model",
- "task": "text-generation"
+ "description": "Chat with Gpt J 6b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Gpt J 6b",
"id": "gpt-j-6b-int8-ov",
- "fileSize": 6515945720,
+ "fileSize": 6515945792,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Gpt J 6b model",
- "task": "text-generation"
+ "description": "Chat with Gpt J 6b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Gpt J 6b",
"id": "gpt-j-6b-fp16-ov",
- "fileSize": 13001251300,
+ "fileSize": 13001251330,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Gpt J 6b model",
- "task": "text-generation"
+ "description": "Chat with Gpt J 6b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Falcon 7b Instruct",
"id": "falcon-7b-instruct-int4-ov",
- "fileSize": 3959308647,
+ "fileSize": 3959308719,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Falcon 7b Instruct model",
- "task": "text-generation"
+ "description": "Chat with Falcon 7b Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Falcon 7b Instruct",
"id": "falcon-7b-instruct-fp16-ov",
- "fileSize": 14825512501,
+ "fileSize": 14825512542,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Falcon 7b Instruct model",
- "task": "text-generation"
+ "description": "Chat with Falcon 7b Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Falcon 7b Instruct",
"id": "falcon-7b-instruct-int8-ov",
- "fileSize": 7449021953,
+ "fileSize": 7449022025,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Falcon 7b Instruct model",
- "task": "text-generation"
+ "description": "Chat with Falcon 7b Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Open_llama_7b_v2",
"id": "open_llama_7b_v2-int8-ov",
- "fileSize": 7243946706,
+ "fileSize": 7243946788,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Open_llama_7b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_7b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Open_llama_7b_v2",
"id": "open_llama_7b_v2-int4-ov",
- "fileSize": 4581255942,
+ "fileSize": 4581256014,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Open_llama_7b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_7b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Open_llama_7b_v2",
"id": "open_llama_7b_v2-fp16-ov",
- "fileSize": 14502136910,
+ "fileSize": 14502136961,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Open_llama_7b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_7b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Open_llama_3b_v2",
"id": "open_llama_3b_v2-int8-ov",
- "fileSize": 3689232132,
+ "fileSize": 3689232204,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Open_llama_3b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_3b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Open_llama_3b_v2",
"id": "open_llama_3b_v2-fp16-ov",
- "fileSize": 7361187312,
+ "fileSize": 7361187363,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Open_llama_3b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_3b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 2",
"id": "phi-2-int4-ov",
- "fileSize": 1963097577,
+ "fileSize": 1963097638,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Phi 2 model",
- "task": "text-generation"
+ "description": "Chat with Phi 2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Neural Chat 7b V3 3",
"id": "neural-chat-7b-v3-3-int4-ov",
- "fileSize": 4957174834,
+ "fileSize": 4957174906,
"optimizationPrecision": "int4",
"contextWindow": 32768,
- "description": "Chat with Neural Chat 7b V3 3 model",
- "task": "text-generation"
+ "description": "Chat with Neural Chat 7b V3 3",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Notus 7b V1",
"id": "notus-7b-v1-int4-ov",
- "fileSize": 4957175373,
+ "fileSize": 4957175444,
"optimizationPrecision": "int4",
"contextWindow": 32768,
- "description": "Chat with Notus 7b V1 model",
- "task": "text-generation"
+ "description": "Chat with Notus 7b V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE Chat 3B V1",
"id": "RedPajama-INCITE-Chat-3B-v1-int8-ov",
- "fileSize": 3003403190,
+ "fileSize": 2993181070,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE Chat 3B V1 model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE Chat 3B V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE 7B Instruct",
"id": "RedPajama-INCITE-7B-Instruct-fp16-ov",
- "fileSize": 14717999973,
+ "fileSize": 14718000035,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE 7B Instruct model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE 7B Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE 7B Instruct",
"id": "RedPajama-INCITE-7B-Instruct-int4-ov",
- "fileSize": 7384270376,
+ "fileSize": 7384270468,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE 7B Instruct model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE 7B Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE 7B Chat",
"id": "RedPajama-INCITE-7B-Chat-int4-ov",
- "fileSize": 4753728620,
+ "fileSize": 4753728702,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE 7B Chat model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE 7B Chat",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE 7B Instruct",
"id": "RedPajama-INCITE-7B-Instruct-int8-ov",
- "fileSize": 7384270355,
+ "fileSize": 7384270448,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE 7B Instruct model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE 7B Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE 7B Chat",
"id": "RedPajama-INCITE-7B-Chat-fp16-ov",
- "fileSize": 14717999600,
+ "fileSize": 14717999652,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE 7B Chat model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE 7B Chat",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE Chat 3B V1",
"id": "RedPajama-INCITE-Chat-3B-v1-int4-ov",
- "fileSize": 1972726843,
+ "fileSize": 1693954060,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE Chat 3B V1 model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE Chat 3B V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE 7B Chat",
"id": "RedPajama-INCITE-7B-Chat-int8-ov",
- "fileSize": 7384270239,
+ "fileSize": 7384270331,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE 7B Chat model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE 7B Chat",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE Chat 3B V1",
"id": "RedPajama-INCITE-Chat-3B-v1-fp16-ov",
- "fileSize": 5977741177,
+ "fileSize": 5967266928,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE Chat 3B V1 model",
- "task": "text-generation"
- },
- {
- "name": "Dolly V2 12b",
- "id": "dolly-v2-12b-int4-ov",
- "fileSize": 8093674841,
- "optimizationPrecision": "int4",
- "contextWindow": 2048,
- "description": "Chat with Dolly V2 12b model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE Chat 3B V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 7b",
"id": "dolly-v2-7b-int4-ov",
- "fileSize": 4753855475,
+ "fileSize": 4753855546,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 7b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 7b",
"id": "dolly-v2-7b-int8-ov",
- "fileSize": 7384407579,
+ "fileSize": 7384407651,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 7b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 7b",
"id": "dolly-v2-7b-fp16-ov",
- "fileSize": 14718147683,
+ "fileSize": 14718147724,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 7b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mistral 7B Instruct V0.2",
"id": "Mistral-7B-Instruct-v0.2-int8-ov",
- "fileSize": 7823897819,
+ "fileSize": 7823897901,
"optimizationPrecision": "int8",
"contextWindow": 32768,
- "description": "Chat with Mistral 7B Instruct V0.2 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7B Instruct V0.2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Dolly V2 12b",
"id": "dolly-v2-12b-int8-ov",
- "fileSize": 12785790267,
+ "fileSize": 12785790338,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Dolly V2 12b model",
- "task": "text-generation"
+ "description": "Chat with Dolly V2 12b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mistral 7B Instruct V0.2",
"id": "Mistral-7B-Instruct-v0.2-int4-ov",
- "fileSize": 4957164416,
+ "fileSize": 4957164498,
"optimizationPrecision": "int4",
"contextWindow": 32768,
- "description": "Chat with Mistral 7B Instruct V0.2 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7B Instruct V0.2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mistral 7B Instruct V0.2",
"id": "Mistral-7B-Instruct-v0.2-fp16-ov",
- "fileSize": 15576062131,
+ "fileSize": 15576062183,
"optimizationPrecision": "fp16",
"contextWindow": 32768,
- "description": "Chat with Mistral 7B Instruct V0.2 model",
- "task": "text-generation"
+ "description": "Chat with Mistral 7B Instruct V0.2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Codegen25 7b Multi",
"id": "codegen25-7b-multi-int4-ov",
- "fileSize": 4760257312,
+ "fileSize": 4074538822,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Codegen25 7b Multi model",
- "task": "text-generation"
+ "description": "Chat with Codegen25 7b Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Persimmon 8b Chat",
"id": "persimmon-8b-chat-int4-ov",
- "fileSize": 6896839595,
+ "fileSize": 6896839666,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Persimmon 8b Chat model",
- "task": "text-generation"
+ "description": "Chat with Persimmon 8b Chat",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Persimmon 8b Chat",
"id": "persimmon-8b-chat-int8-ov",
- "fileSize": 12791514405,
+ "fileSize": 12791514477,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Persimmon 8b Chat model",
- "task": "text-generation"
+ "description": "Chat with Persimmon 8b Chat",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 1.4b",
"id": "pythia-1.4b-int4-ov",
- "fileSize": 6890411793,
+ "fileSize": 6890411865,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Pythia 1.4b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 1.4b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 1.4b",
"id": "pythia-1.4b-int8-ov",
- "fileSize": 12785086603,
+ "fileSize": 12785086675,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Pythia 1.4b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 1.4b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Persimmon 8b Chat",
"id": "persimmon-8b-chat-fp16-ov",
- "fileSize": 25461688234,
+ "fileSize": 25461688275,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Persimmon 8b Chat model",
- "task": "text-generation"
+ "description": "Chat with Persimmon 8b Chat",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 1.4b",
"id": "pythia-1.4b-fp16-ov",
- "fileSize": 25455260443,
+ "fileSize": 25455260474,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Pythia 1.4b model",
- "task": "text-generation"
- },
- {
- "name": "Pythia 12b",
- "id": "pythia-12b-int4-ov",
- "fileSize": 3824586206,
- "optimizationPrecision": "int4",
- "contextWindow": 2048,
- "description": "Chat with Pythia 12b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 1.4b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 12b",
"id": "pythia-12b-int8-ov",
- "fileSize": 7153039029,
+ "fileSize": 7153039101,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Pythia 12b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 12b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 2.8b",
"id": "pythia-2.8b-int8-ov",
- "fileSize": 7153039039,
+ "fileSize": 7153039111,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Pythia 2.8b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 2.8b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 2.8b",
"id": "pythia-2.8b-int4-ov",
- "fileSize": 3824586216,
+ "fileSize": 3824586288,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Pythia 2.8b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 2.8b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 12b",
"id": "pythia-12b-fp16-ov",
- "fileSize": 14293243461,
+ "fileSize": 14293243502,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Pythia 12b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 12b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 6.9b",
"id": "pythia-6.9b-int4-ov",
- "fileSize": 3824586216,
+ "fileSize": 3824586288,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Pythia 6.9b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 6.9b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 6.9b",
"id": "pythia-6.9b-int8-ov",
- "fileSize": 7153039039,
+ "fileSize": 7153039111,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Pythia 6.9b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 6.9b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 2.8b",
"id": "pythia-2.8b-fp16-ov",
- "fileSize": 14293243256,
+ "fileSize": 14293243287,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Pythia 2.8b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 2.8b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 6.9b",
"id": "pythia-6.9b-fp16-ov",
- "fileSize": 14293243256,
+ "fileSize": 14293243287,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Pythia 6.9b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 6.9b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 1b",
"id": "pythia-1b-int4-ov",
- "fileSize": 669587847,
+ "fileSize": 669587919,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Pythia 1b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 1b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 1b",
"id": "pythia-1b-int8-ov",
- "fileSize": 1107284420,
+ "fileSize": 1107284481,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Pythia 1b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 1b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Pythia 1b",
"id": "pythia-1b-fp16-ov",
- "fileSize": 2181025578,
+ "fileSize": 2181025619,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Pythia 1b model",
- "task": "text-generation"
+ "description": "Chat with Pythia 1b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Neural Chat 7b V1 1",
"id": "neural-chat-7b-v1-1-int4-ov",
- "fileSize": 3824586268,
+ "fileSize": 3824586350,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Neural Chat 7b V1 1 model",
- "task": "text-generation"
+ "description": "Chat with Neural Chat 7b V1 1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Neural Chat 7b V1 1",
"id": "neural-chat-7b-v1-1-int8-ov",
- "fileSize": 7153039101,
+ "fileSize": 7153039173,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Neural Chat 7b V1 1 model",
- "task": "text-generation"
+ "description": "Chat with Neural Chat 7b V1 1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Neural Chat 7b V1 1",
"id": "neural-chat-7b-v1-1-fp16-ov",
- "fileSize": 14293243287,
+ "fileSize": 14293243328,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Neural Chat 7b V1 1 model",
- "task": "text-generation"
+ "description": "Chat with Neural Chat 7b V1 1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Medium 4k Instruct",
"id": "Phi-3-medium-4k-instruct-fp16-ov",
- "fileSize": 29965606794,
+ "fileSize": 29965606845,
"optimizationPrecision": "fp16",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Medium 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Medium 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Medium 4k Instruct",
"id": "Phi-3-medium-4k-instruct-int4-ov",
- "fileSize": 7964805299,
+ "fileSize": 7964805381,
"optimizationPrecision": "int4",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Medium 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Medium 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Medium 4k Instruct",
"id": "Phi-3-medium-4k-instruct-int8-ov",
- "fileSize": 15040585641,
+ "fileSize": 15040585723,
"optimizationPrecision": "int8",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Medium 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Medium 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mpt 7b",
"id": "mpt-7b-int8-ov",
- "fileSize": 7146788625,
+ "fileSize": 7146788697,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with Mpt 7b model",
- "task": "text-generation"
+ "description": "Chat with Mpt 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Mpt 7b",
"id": "mpt-7b-fp16-ov",
- "fileSize": 14286814799,
+ "fileSize": 14286814840,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with Mpt 7b model",
- "task": "text-generation"
+ "description": "Chat with Mpt 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 15b",
"id": "starcoder2-15b-int8-ov",
- "fileSize": 17190289720,
+ "fileSize": 17190289792,
"optimizationPrecision": "int8",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 15b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 15b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 15b",
"id": "starcoder2-15b-int4-ov",
- "fileSize": 9169658515,
+ "fileSize": 9169658587,
"optimizationPrecision": "int4",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 15b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 15b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 15b",
"id": "starcoder2-15b-fp16-ov",
- "fileSize": 34262102706,
+ "fileSize": 34262102747,
"optimizationPrecision": "fp16",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 15b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 15b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 7b",
"id": "starcoder2-7b-fp16-ov",
- "fileSize": 15470719144,
+ "fileSize": 15470719185,
"optimizationPrecision": "fp16",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 7b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 7b",
"id": "starcoder2-7b-int4-ov",
- "fileSize": 4111254624,
+ "fileSize": 4111254696,
"optimizationPrecision": "int4",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 7b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 7b",
"id": "starcoder2-7b-int8-ov",
- "fileSize": 7729586294,
+ "fileSize": 7729586365,
"optimizationPrecision": "int8",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 7b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 3b",
"id": "starcoder2-3b-int4-ov",
- "fileSize": 1780962229,
+ "fileSize": 1780962300,
"optimizationPrecision": "int4",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 3b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 3b",
"id": "starcoder2-3b-fp16-ov",
- "fileSize": 6526229346,
+ "fileSize": 6526229387,
"optimizationPrecision": "fp16",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 3b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Starcoder2 3b",
"id": "starcoder2-3b-int8-ov",
- "fileSize": 3273295377,
+ "fileSize": 3273295448,
"optimizationPrecision": "int8",
"contextWindow": 16384,
- "description": "Chat with Starcoder2 3b model",
- "task": "text-generation"
+ "description": "Chat with Starcoder2 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Mini 4k Instruct",
"id": "Phi-3-mini-4k-instruct-fp16-ov",
- "fileSize": 8209920736,
+ "fileSize": 8212081759,
"optimizationPrecision": "fp16",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Mini 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Mini 128k Instruct",
"id": "Phi-3-mini-128k-instruct-fp16-ov",
- "fileSize": 8210027955,
+ "fileSize": 8210027996,
"optimizationPrecision": "fp16",
"contextWindow": 131072,
- "description": "Chat with Phi 3 Mini 128k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 128k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Mini 128k Instruct",
"id": "Phi-3-mini-128k-instruct-int4-ov",
- "fileSize": 2637434178,
+ "fileSize": 2637434260,
"optimizationPrecision": "int4",
"contextWindow": 131072,
- "description": "Chat with Phi 3 Mini 128k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 128k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Mini 4k Instruct",
"id": "Phi-3-mini-4k-instruct-int4-ov",
- "fileSize": 2637358233,
+ "fileSize": 2317366276,
"optimizationPrecision": "int4",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Mini 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Mini 4k Instruct",
"id": "Phi-3-mini-4k-instruct-int8-ov",
- "fileSize": 4108269167,
+ "fileSize": 4110513544,
"optimizationPrecision": "int8",
"contextWindow": 4096,
- "description": "Chat with Phi 3 Mini 4k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 4k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Phi 3 Mini 128k Instruct",
"id": "Phi-3-mini-128k-instruct-int8-ov",
- "fileSize": 4108345114,
+ "fileSize": 4108345195,
"optimizationPrecision": "int8",
"contextWindow": 131072,
- "description": "Chat with Phi 3 Mini 128k Instruct model",
- "task": "text-generation"
+ "description": "Chat with Phi 3 Mini 128k Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "Open_llama_3b_v2",
"id": "open_llama_3b_v2-int4-ov",
- "fileSize": 1960434251,
+ "fileSize": 1960434322,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with Open_llama_3b_v2 model",
- "task": "text-generation"
+ "description": "Chat with Open_llama_3b_v2",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE Instruct 3B V1",
"id": "RedPajama-INCITE-Instruct-3B-v1-fp16-ov",
- "fileSize": 5975908581,
+ "fileSize": 5975908643,
"optimizationPrecision": "fp16",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE Instruct 3B V1 model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE Instruct 3B V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE Instruct 3B V1",
"id": "RedPajama-INCITE-Instruct-3B-v1-int4-ov",
- "fileSize": 1970894247,
+ "fileSize": 1970894350,
"optimizationPrecision": "int4",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE Instruct 3B V1 model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE Instruct 3B V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
},
{
"name": "RedPajama INCITE Instruct 3B V1",
"id": "RedPajama-INCITE-Instruct-3B-v1-int8-ov",
- "fileSize": 3001571035,
+ "fileSize": 3001571127,
"optimizationPrecision": "int8",
"contextWindow": 2048,
- "description": "Chat with RedPajama INCITE Instruct 3B V1 model",
- "task": "text-generation"
+ "description": "Chat with RedPajama INCITE Instruct 3B V1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2b It",
+ "id": "gemma-2b-it-fp16-ov",
+ "fileSize": 5437344390,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2b It",
+ "id": "gemma-2b-it-int8-ov",
+ "fileSize": 2753201206,
+ "optimizationPrecision": "int8",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2b",
+ "id": "gemma-2b-fp16-ov",
+ "fileSize": 5437342382,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2b",
+ "id": "gemma-2b-int4-ov",
+ "fileSize": 1722552895,
+ "optimizationPrecision": "int4",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2b It",
+ "id": "gemma-2b-it-int4-ov",
+ "fileSize": 1722555876,
+ "optimizationPrecision": "int4",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 7b",
+ "id": "gemma-7b-fp16-ov",
+ "fileSize": 18419687858,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 7b",
+ "id": "gemma-7b-int4-ov",
+ "fileSize": 5223957293,
+ "optimizationPrecision": "int4",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 7b",
+ "id": "gemma-7b-int8-ov",
+ "fileSize": 9228794075,
+ "optimizationPrecision": "int8",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 7b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 7b It",
+ "id": "gemma-7b-it-int8-ov",
+ "fileSize": 9228795991,
+ "optimizationPrecision": "int8",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 7b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 7b It",
+ "id": "gemma-7b-it-fp16-ov",
+ "fileSize": 18419689774,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 7b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 7b It",
+ "id": "gemma-7b-it-int4-ov",
+ "fileSize": 5223959210,
+ "optimizationPrecision": "int4",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 7b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Bloomz 1b1",
+ "id": "bloomz-1b1-fp16-ov",
+ "fileSize": 2322177211,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Chat with Bloomz 1b1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Bloomz 1b1",
+ "id": "bloomz-1b1-int4-ov",
+ "fileSize": 812344015,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Chat with Bloomz 1b1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Bloomz 3b",
+ "id": "bloomz-3b-int8-ov",
+ "fileSize": 3267500581,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Chat with Bloomz 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Bloomz 1b1",
+ "id": "bloomz-1b1-int8-ov",
+ "fileSize": 1184136430,
+ "optimizationPrecision": "int8",
+ "contextWindow": 0,
+ "description": "Chat with Bloomz 1b1",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Bloomz 3b",
+ "id": "bloomz-3b-int4-ov",
+ "fileSize": 2043570274,
+ "optimizationPrecision": "int4",
+ "contextWindow": 0,
+ "description": "Chat with Bloomz 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Bloomz 3b",
+ "id": "bloomz-3b-fp16-ov",
+ "fileSize": 6488568080,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 0,
+ "description": "Chat with Bloomz 3b",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Codegen 2B Multi",
+ "id": "codegen-2B-multi-int8-ov",
+ "fileSize": 2995146381,
+ "optimizationPrecision": "int8",
+ "contextWindow": 2048,
+ "description": "Chat with Codegen 2B Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Codegen 2B Multi",
+ "id": "codegen-2B-multi-fp16-ov",
+ "fileSize": 5980001146,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 2048,
+ "description": "Chat with Codegen 2B Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Codegen 2B Multi",
+ "id": "codegen-2B-multi-int4-ov",
+ "fileSize": 1696055110,
+ "optimizationPrecision": "int4",
+ "contextWindow": 2048,
+ "description": "Chat with Codegen 2B Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Codegen 6B Multi",
+ "id": "codegen-6B-multi-int4-ov",
+ "fileSize": 4165776649,
+ "optimizationPrecision": "int4",
+ "contextWindow": 2048,
+ "description": "Chat with Codegen 6B Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Codegen 6B Multi",
+ "id": "codegen-6B-multi-fp16-ov",
+ "fileSize": 15149850695,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 2048,
+ "description": "Chat with Codegen 6B Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Codegen 6B Multi",
+ "id": "codegen-6B-multi-int8-ov",
+ "fileSize": 7601603664,
+ "optimizationPrecision": "int8",
+ "contextWindow": 2048,
+ "description": "Chat with Codegen 6B Multi",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Phi 3.5 Mini Instruct",
+ "id": "Phi-3.5-mini-instruct-fp16-ov",
+ "fileSize": 8211750487,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 131072,
+ "description": "Chat with Phi 3.5 Mini Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Phi 3.5 Mini Instruct",
+ "id": "Phi-3.5-mini-instruct-int8-ov",
+ "fileSize": 4110193740,
+ "optimizationPrecision": "int8",
+ "contextWindow": 131072,
+ "description": "Chat with Phi 3.5 Mini Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Phi 3.5 Mini Instruct",
+ "id": "Phi-3.5-mini-instruct-int4-ov",
+ "fileSize": 2242029798,
+ "optimizationPrecision": "int4",
+ "contextWindow": 131072,
+ "description": "Chat with Phi 3.5 Mini Instruct",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2 9b It",
+ "id": "gemma-2-9b-it-int4-ov",
+ "fileSize": 5698219462,
+ "optimizationPrecision": "int4",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2 9b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2 9b It",
+ "id": "gemma-2-9b-it-int8-ov",
+ "fileSize": 9992851184,
+ "optimizationPrecision": "int8",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2 9b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
+ },
+ {
+ "name": "Gemma 2 9b It",
+ "id": "gemma-2-9b-it-fp16-ov",
+ "fileSize": 19924637310,
+ "optimizationPrecision": "fp16",
+ "contextWindow": 8192,
+ "description": "Chat with Gemma 2 9b It",
+ "task": "text-generation",
+ "author": "OpenVINO",
+ "collection": "llm-6687aaa2abca3bbcec71a9bd"
}
]
}
diff --git a/design_graph.png b/design_graph.png
deleted file mode 100644
index 33bed087..00000000
Binary files a/design_graph.png and /dev/null differ
diff --git a/docs/geti_batch.gif b/docs/geti_batch.gif
new file mode 100644
index 00000000..25311a0b
Binary files /dev/null and b/docs/geti_batch.gif differ
diff --git a/docs/geti_cv.gif b/docs/geti_cv.gif
new file mode 100644
index 00000000..ca0e0fcd
Binary files /dev/null and b/docs/geti_cv.gif differ
diff --git a/docs/geti_download.gif b/docs/geti_download.gif
new file mode 100644
index 00000000..baa26aa4
Binary files /dev/null and b/docs/geti_download.gif differ
diff --git a/docs/geti_import.gif b/docs/geti_import.gif
new file mode 100644
index 00000000..1d91dd20
Binary files /dev/null and b/docs/geti_import.gif differ
diff --git a/docs/llm_import.gif b/docs/llm_import.gif
new file mode 100644
index 00000000..aa47540f
Binary files /dev/null and b/docs/llm_import.gif differ
diff --git a/docs/llm_model_chat.gif b/docs/llm_model_chat.gif
new file mode 100644
index 00000000..98d47226
Binary files /dev/null and b/docs/llm_model_chat.gif differ
diff --git a/docs/metrics.gif b/docs/metrics.gif
new file mode 100644
index 00000000..c62735bc
Binary files /dev/null and b/docs/metrics.gif differ
diff --git a/docs/readme.gif b/docs/readme.gif
new file mode 100644
index 00000000..923f5133
Binary files /dev/null and b/docs/readme.gif differ
diff --git a/docs/win_inst.gif b/docs/win_inst.gif
new file mode 100644
index 00000000..1f926392
Binary files /dev/null and b/docs/win_inst.gif differ
diff --git a/docs/win_inst2.gif b/docs/win_inst2.gif
new file mode 100644
index 00000000..ecb4fe44
Binary files /dev/null and b/docs/win_inst2.gif differ
diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart
index 2c6bd98f..01eb345b 100644
--- a/integration_test/app_test.dart
+++ b/integration_test/app_test.dart
@@ -1,4 +1,3 @@
-import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:inference/main.dart';
import 'package:integration_test/integration_test.dart';
@@ -7,28 +6,27 @@ void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('Download model from HF', (tester) async {
- final originalOnError = FlutterError.onError!;
-
const app = App();
await tester.pumpWidget(app);
- FlutterError.onError = originalOnError;
-
- await tester.tap(find.text('Import Model'));
+ await tester.tap(find.text('Import model'));
await tester.pumpAndSettle();
- await tester.tap(find.text('Huggingface'));
+ await tester.tap(find.text('Hugging Face'));
await tester.pumpAndSettle();
- await tester.tap(find.bySemanticsLabel('Search by name'));
+ final searchBarFinder = find.bySemanticsLabel('Find a model').first;
+ await tester.tap(searchBarFinder, warnIfMissed: false);
await tester.pumpAndSettle();
- await tester.enterText(find.bySemanticsLabel('Search by name'), 'tiny');
+ await tester.enterText(searchBarFinder, 'tiny');
await tester.pumpAndSettle();
- await tester.tap(find.text('TinyLlama-1.1B-Chat-v1.0-int4-ov'));
+ await tester.tap(find.text('TinyLlama 1.1B Chat V1.0').first);
await tester.pumpAndSettle();
- await tester.tap(find.text('Add model'));
+ await tester.tap(find.text('Import selected model'));
await tester.pumpFrames(app, const Duration(seconds: 1));
- expect(find.textContaining(RegExp(r'^[1-9]\d* MB$')), findsNWidgets(2));
+ expect(find.textContaining(RegExp(r'^[1-9][\d,]* MB$')), findsNWidgets(2));
+
+ await tester.pumpAndSettle();
});
}
\ No newline at end of file
diff --git a/lib/importers/manifest_importer.dart b/lib/importers/manifest_importer.dart
index 116f272c..7391c7d5 100644
--- a/lib/importers/manifest_importer.dart
+++ b/lib/importers/manifest_importer.dart
@@ -1,9 +1,14 @@
import 'dart:convert';
+import 'dart:io';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
+import 'package:inference/project.dart';
+import 'package:inference/public_model_info.dart';
import 'package:inference/utils/get_public_thumbnail.dart';
import 'package:inference/utils.dart';
+import 'package:path_provider/path_provider.dart';
+import 'package:uuid/uuid.dart';
class Model {
final String name;
@@ -45,6 +50,48 @@ class Model {
task: json['task'],
);
}
+
+ Future convertToProject() async {
+ final directory = await getApplicationSupportDirectory();
+ final projectId = const Uuid().v4();
+ final storagePath = platformContext.join(directory.path, projectId.toString());
+ await Directory(storagePath).create(recursive: true);
+ final projectType = parseProjectType(task);
+
+ final project = PublicProject(
+ projectId,
+ "OpenVINO/$id",
+ "1.0.0",
+ name,
+ DateTime.now().toIso8601String(),
+ projectType,
+ storagePath,
+ thumbnail,
+ PublicModelInfo(
+ id,
+ DateTime.now().toIso8601String(),
+ 0,
+ 0,
+ task,
+ const Collection("https://huggingface.co/api/collections/OpenVINO/llm-6687aaa2abca3bbcec71a9bd", "", "text"),
+ ),
+ );
+
+ project.tasks.add(
+ Task(
+ genUUID(),
+ task,
+ task,
+ [],
+ null,
+ [],
+ "",
+ "",
+ ),
+ );
+
+ return project;
+ }
}
class ManifestImporter {
diff --git a/lib/inference/download_page.dart b/lib/inference/download_page.dart
index fac683be..c228c99e 100644
--- a/lib/inference/download_page.dart
+++ b/lib/inference/download_page.dart
@@ -38,7 +38,7 @@ class _DownloadPageState extends State {
final downloadProvider = Provider.of(context, listen: false);
final projectProvider = Provider.of(context, listen: false);
- final files = await downloadFiles(widget.project);
+ final files = await listDownloadFiles(widget.project);
try {
await downloadProvider.queue(files, widget.project.modelInfo?.collection.token);
diff --git a/lib/inference/inference_page.dart b/lib/inference/inference_page.dart
index 9bd08cbb..6e13ac09 100644
--- a/lib/inference/inference_page.dart
+++ b/lib/inference/inference_page.dart
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:inference/inference/download_page.dart';
import 'package:inference/inference/image_inference_page.dart';
import 'package:inference/inference/text_inference_page.dart';
+import 'package:inference/inference/text_to_image_inference_page.dart';
import 'package:inference/project.dart';
import 'package:inference/providers/download_provider.dart';
import 'package:provider/provider.dart';
@@ -23,12 +24,14 @@ class _InferencePageState extends State {
return ImageInferencePage(widget.project);
case ProjectType.text:
return TextInferencePage(widget.project);
+ case ProjectType.textToImage:
+ return TextToImageInferencePage(widget.project);
case ProjectType.speech:
return Container();
}
} else {
return ChangeNotifierProvider(
- create: (_) => DownloadProvider(widget.project),
+ create: (_) => DownloadProvider(),
child: DownloadPage(widget.project as PublicProject,
onDone: () => setState(() {}), //trigger rerender.
)
diff --git a/lib/inference/textToImage/tti_metric_widgets.dart b/lib/inference/textToImage/tti_metric_widgets.dart
new file mode 100644
index 00000000..c7cc4e6f
--- /dev/null
+++ b/lib/inference/textToImage/tti_metric_widgets.dart
@@ -0,0 +1,33 @@
+import 'package:flutter/material.dart';
+import 'package:inference/inference/text/metric_widgets.dart';
+import 'package:inference/interop/openvino_bindings.dart';
+import 'package:intl/intl.dart';
+
+class TTICirclePropRow extends StatelessWidget {
+ final TTIMetrics metrics;
+
+ const TTICirclePropRow({super.key, required this.metrics});
+
+ @override
+ Widget build(BuildContext context) {
+ Locale locale = Localizations.localeOf(context);
+ final nf = NumberFormat.decimalPatternDigits(
+ locale: locale.languageCode, decimalDigits: 0);
+
+ return Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ CircleProp(
+ header: "Time to load model",
+ value: nf.format(metrics.load_time),
+ unit: "ms",
+ ),
+ CircleProp(
+ header: "Time to generate image",
+ value: nf.format(metrics.generate_time),
+ unit: "ms",
+ )
+ ],
+ );
+ }
+}
diff --git a/lib/inference/textToImage/tti_performance_metrics.dart b/lib/inference/textToImage/tti_performance_metrics.dart
new file mode 100644
index 00000000..7279701c
--- /dev/null
+++ b/lib/inference/textToImage/tti_performance_metrics.dart
@@ -0,0 +1,71 @@
+import 'package:flutter/material.dart';
+import 'package:inference/inference/text/metric_widgets.dart';
+import 'package:inference/inference/textToImage/tti_metric_widgets.dart';
+import 'package:inference/providers/text_to_image_inference_provider.dart';
+import 'package:inference/theme.dart';
+import 'package:intl/intl.dart';
+import 'package:provider/provider.dart';
+
+class TTIPerformanceMetricsPage extends StatefulWidget {
+ const TTIPerformanceMetricsPage({super.key});
+
+ @override
+ State createState() => _TTIPerformanceMetricsPageState();
+}
+
+class _TTIPerformanceMetricsPageState extends State {
+
+ @override
+ void initState() {
+ super.initState();
+ final provider = Provider.of(context, listen: false);
+ if (provider.metrics == null) {
+ provider.loaded.future.then((_) {
+ provider.message("Generate OpenVINO logo");
+ });
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Consumer(builder: (context, inference, child) {
+ if (inference.metrics == null) {
+ return Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset('images/intel-loading.gif', width: 100),
+ const Text("Running benchmark prompt...")
+ ],
+ )
+ );
+ }
+
+ Locale locale = Localizations.localeOf(context);
+ final nf = NumberFormat.decimalPatternDigits(
+ locale: locale.languageCode, decimalDigits: 0);
+
+ final metrics = inference.metrics!;
+
+ return Container(
+ decoration: BoxDecoration(
+ shape: BoxShape.rectangle,
+ borderRadius: const BorderRadius.all(Radius.circular(8)),
+ color: intelGray,
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(30.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ TTICirclePropRow(metrics: metrics),
+ ],
+ ),
+ ),
+ );
+ });
+ }
+}
+
+
diff --git a/lib/inference/textToImage/tti_playground.dart b/lib/inference/textToImage/tti_playground.dart
new file mode 100644
index 00000000..3a468f8c
--- /dev/null
+++ b/lib/inference/textToImage/tti_playground.dart
@@ -0,0 +1,463 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:inference/config.dart';
+import 'package:inference/hint.dart';
+import 'package:inference/inference/device_selector.dart';
+import 'package:inference/inference/textToImage/tti_metric_widgets.dart';
+import 'package:inference/interop/openvino_bindings.dart';
+import 'package:inference/providers/text_to_image_inference_provider.dart';
+import 'package:inference/theme.dart';
+import 'package:provider/provider.dart';
+import 'package:super_clipboard/super_clipboard.dart';
+
+class TTIPlayground extends StatefulWidget {
+ const TTIPlayground({super.key});
+
+ @override
+ State createState() => _PlaygroundState();
+}
+
+class _PlaygroundState extends State {
+ final _controller = TextEditingController();
+ final _scrollController = ScrollController();
+ bool attachedToBottom = true;
+
+ void jumpToBottom({ offset = 0 }) {
+ if (_scrollController.hasClients) {
+ _scrollController.jumpTo(_scrollController.position.maxScrollExtent + offset);
+ }
+ }
+
+ void message(String message) async {
+ if (message.isEmpty) {
+ return;
+ }
+ final tti = provider();
+ if (!tti.initialized) {
+ return;
+ }
+
+ if (tti.response != null) {
+ return;
+ }
+ _controller.text = "";
+ jumpToBottom(offset: 110); //move to bottom including both
+ tti.message(message);
+ }
+
+ TextToImageInferenceProvider provider() => Provider.of(context, listen: false);
+
+ @override
+ void initState() {
+ super.initState();
+ _scrollController.addListener(() {
+ setState(() {
+ attachedToBottom = _scrollController.position.pixels + 0.001 >= _scrollController.position.maxScrollExtent;
+ });
+
+ });
+ }
+
+ @override
+ void dispose() {
+ super.dispose();
+ _controller.dispose();
+ _scrollController.dispose();
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ return Consumer(builder: (context, inference, child) {
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (attachedToBottom) {
+ jumpToBottom();
+ }
+ });
+
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Padding(
+ padding: EdgeInsets.only(left: 8),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ DeviceSelector(),
+ Hint(hint: HintsEnum.intelCoreLLMPerformanceSuggestion),
+ ]
+ ),
+ ),
+ Builder(
+ builder: (context) {
+ if (!inference.initialized){
+ return Expanded(
+ child: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset('images/intel-loading.gif', width: 100),
+ const Text("Loading model...")
+ ],
+ )
+ ),
+ );
+ }
+ return Expanded(
+ child: Container(
+ decoration: const BoxDecoration(
+ shape: BoxShape.rectangle,
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ color: intelGray,
+ ),
+ child: Column(
+ children: [
+ Expanded(
+ child: Builder(builder: (context) {
+ if (inference.messages.isEmpty) {
+ return Center(
+ child: Text("Type a message to ${inference.project?.name ?? "assistant"}"));
+ }
+ return Stack(
+ alignment: Alignment.bottomCenter,
+ children: [
+ SingleChildScrollView(
+ controller: _scrollController,
+ child: Padding(
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ //mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: inference.messages.map((message) {
+ switch (message.speaker) {
+ case Speaker.user:
+ return UserInputMessage(message);
+ case Speaker.assistant:
+ return GeneratedImageMessage(message, inference.project!.name);
+ }
+ }).toList()),
+ ),
+ ),
+ Positioned(
+ bottom: 10,
+ child: Builder(
+ builder: (context) {
+ if (attachedToBottom) {
+ return Container();
+ }
+ return Center(
+ child: Padding(
+ padding: const EdgeInsets.only(top: 2.0),
+ child: SizedBox(
+ width: 200,
+ height: 20,
+ child: FloatingActionButton(
+ backgroundColor: intelGray,
+ child: const Text("Jump to bottom"),
+ onPressed: () {
+ jumpToBottom();
+ setState(() {
+ attachedToBottom = true;
+ });
+ }
+ ),
+ ),
+ ),
+ );
+ }
+ ),
+ ),
+
+ ],
+ );
+ }),
+ ),
+
+ // SizedBox(
+ // height: 30,
+ // child: Builder(
+ // builder: (context) {
+ // if (inference.interimResponse == null){
+ // return Container();
+ // }
+ // return Center(
+ // child: OutlinedButton.icon(
+ // onPressed: () => inference.forceStop(),
+ // icon: const Icon(Icons.stop),
+ // label: const Text("Stop responding")
+ // ),
+ // );
+ // }
+ // ),
+ // ),
+ Padding(
+ padding: const EdgeInsets.only(left: 45, right: 45, top: 10, bottom: 25),
+ child: SizedBox(
+ height: 40,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(right: 8),
+ child: IconButton(
+ icon: SvgPicture.asset("images/clear.svg",
+ colorFilter: const ColorFilter.mode(textColor, BlendMode.srcIn),
+ width: 20,
+ ),
+ tooltip: "Clear chat",
+ onPressed: () => inference.reset(),
+ style: IconButton.styleFrom(
+ backgroundColor: intelGrayReallyDark,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.all(Radius.circular(4)),
+ side: BorderSide(
+ color: intelGrayLight,
+ width: 2,
+ )
+ )
+ )
+ ),
+ ),
+ Expanded(
+ child: TextField(
+ maxLines: null,
+ keyboardType: TextInputType.text,
+ decoration: InputDecoration(
+ hintText: "Ask me anything...",
+ suffixIcon: IconButton(
+ icon: Icon(Icons.send, color: (inference.interimResponse == null ? Colors.white : intelGray)),
+ onPressed: () => message(_controller.text),
+ ),
+ enabledBorder: const OutlineInputBorder(
+ borderRadius: BorderRadius.all(Radius.circular(4)),
+ borderSide: BorderSide(
+ color: intelGrayLight,
+ width: 2,
+ )
+ ),
+ ),
+ style: const TextStyle(
+ fontSize: 14,
+ ),
+ controller: _controller,
+ onSubmitted: message,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+ ),
+ ],
+ );
+ });
+ }
+}
+
+class UserInputMessage extends StatelessWidget {
+ final Message message;
+ const UserInputMessage(this.message, {super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ NameRowWidget(name: "You", icon: SvgPicture.asset("images/user.svg",
+ colorFilter: const ColorFilter.mode(textColor, BlendMode.srcIn),
+ width: 20,
+ ),
+ ),
+ MessageWidget(message: message.message),
+ ],
+ ),
+ );
+ }
+}
+
+class GeneratedImageMessage extends StatelessWidget {
+ final Message message;
+ final String name;
+ const GeneratedImageMessage(this.message, this.name, {super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ NameRowWidget(
+ name: name,
+ icon: SvgPicture.asset("images/network.svg",
+ colorFilter: const ColorFilter.mode(textColor, BlendMode.srcIn),
+ width: 20,
+ ),
+ ),
+ ImageWidget(message: message.message, image: Image.memory(message.imageContent!.imageData, width: message.imageContent!.width.toDouble(), height: message.imageContent!.height.toDouble(), fit: message.imageContent!.boxFit)),
+ Padding(
+ padding: const EdgeInsets.only(left: 28, top: 5),
+ child: Builder(
+ builder: (context) {
+ if (message.speaker == Speaker.user) {
+ return Container();
+ }
+ return Row(
+ children: [
+ Opacity(
+ opacity: message.allowedCopy ? 1.0 : 0.25,
+ child:
+ IconButton.filled(
+ icon: SvgPicture.asset("images/copy.svg",
+ colorFilter: const ColorFilter.mode(textColor, BlendMode.srcIn),
+ width: 20,
+ ),
+ style: IconButton.styleFrom(
+ backgroundColor: intelGrayLight,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.all(Radius.circular(4)),
+ ),
+ ),
+ padding: const EdgeInsets.all(4),
+ constraints: const BoxConstraints(),
+ tooltip: message.allowedCopy ? "Copy to clipboard" : null,
+ onPressed: message.imageContent?.imageData == null || message.allowedCopy == false ? null : () {
+
+ final clipboard = SystemClipboard.instance;
+ if (clipboard == null) {
+ return; // Clipboard API is not supported on this platform.
+ }
+ final item = DataWriterItem();
+ item.add(Formats.jpeg(message.imageContent!.imageData));
+ clipboard.write([item]);
+
+ },
+ )
+ ),
+ Padding(
+ padding: const EdgeInsets.only(left: 8),
+ child: IconButton(
+ style: IconButton.styleFrom(
+ backgroundColor: intelGrayLight,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.all(Radius.circular(4)),
+ ),
+ ),
+ padding: const EdgeInsets.all(4),
+ constraints: const BoxConstraints(),
+ icon: SvgPicture.asset("images/stats.svg",
+ colorFilter: const ColorFilter.mode(textColor, BlendMode.srcIn),
+ width: 20,
+ ),
+ tooltip: "Show stats",
+ onPressed: () {
+ showMetricsDialog(context, message.metrics!);
+ },
+ ),
+ ),
+ ],
+ );
+ }
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+void showMetricsDialog(BuildContext context, TTIMetrics metrics) {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return AlertDialog(
+ content: TTICirclePropRow(
+ metrics: metrics
+ )
+ );
+ }
+ );
+}
+
+class NameRowWidget extends StatelessWidget {
+ final String name;
+ final Widget icon;
+ const NameRowWidget({super.key, required this.name, required this.icon});
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(2),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(4.0),
+ color: intelBlueVibrant,
+ //color: intelGrayLight,
+ ),
+ child: icon
+ ),
+ Padding(
+ padding: const EdgeInsets.only(left: 10.0),
+ child: Text(name),
+ )
+ ]
+ );
+ }
+}
+
+class MessageWidget extends StatelessWidget {
+ final String message;
+ const MessageWidget({super.key, required this.message});
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(left: 34.0, top: 10, right: 26),
+ child: SelectableText(
+ message,
+ style: const TextStyle(
+ color: textColor,
+ fontSize: 12,
+ ),
+ ),
+ );
+ }
+
+}
+
+class ImageWidget extends StatelessWidget {
+ final String message;
+ final Image? image;
+ const ImageWidget({super.key, required this.message, required this.image});
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(left: 34.0, top: 10, right: 26),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // Image widget goes here
+ image ?? Container(),
+ const SizedBox(height: 8), // Add some spacing between image and text
+ SelectableText(
+ message,
+ style: const TextStyle(
+ color: textColor,
+ fontSize: 12,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/inference/text_to_image_inference_page.dart b/lib/inference/text_to_image_inference_page.dart
new file mode 100644
index 00000000..509725db
--- /dev/null
+++ b/lib/inference/text_to_image_inference_page.dart
@@ -0,0 +1,187 @@
+import 'package:flutter/material.dart';
+import 'package:inference/header.dart';
+import 'package:inference/inference/model_info.dart';
+import 'package:inference/inference/textToImage/tti_performance_metrics.dart';
+import 'package:inference/inference/textToImage/tti_playground.dart';
+import 'package:inference/project.dart';
+import 'package:inference/providers/preference_provider.dart';
+import 'package:inference/providers/text_to_image_inference_provider.dart';
+import 'package:intl/intl.dart';
+import 'package:provider/provider.dart';
+
+class TextToImageInferencePage extends StatefulWidget {
+ final Project project;
+ const TextToImageInferencePage(this.project, {super.key});
+
+ @override
+ State createState() => _TextToImageInferencePageState();
+}
+
+class _TextToImageInferencePageState extends State with TickerProviderStateMixin {
+
+ late TabController _tabController;
+
+ @override
+ void initState() {
+ super.initState();
+ _tabController = TabController(length: 2, animationDuration: Duration.zero, vsync: this);
+ }
+
+ @override
+ void dispose() {
+ _tabController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ Locale locale = Localizations.localeOf(context);
+
+ return ChangeNotifierProxyProvider(
+ create: (_) {
+ return TextToImageInferenceProvider(widget.project, null);
+ },
+ update: (_, preferences, textToImageInferenceProvider) {
+ if (textToImageInferenceProvider == null) {
+ return TextToImageInferenceProvider(widget.project, preferences.device);
+ }
+ if (!textToImageInferenceProvider.sameProps(widget.project, preferences.device)) {
+ return TextToImageInferenceProvider(widget.project, preferences.device);
+ }
+ return textToImageInferenceProvider;
+ },
+ child: Scaffold(
+ appBar: const Header(true),
+ body: Padding(
+ padding: const EdgeInsets.only(left: 58, right: 58, bottom: 30),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Consumer(
+ builder: (context, inference, child) {
+ final nf = NumberFormat.decimalPatternDigits(
+ locale: locale.languageCode, decimalDigits: 2);
+
+ return SizedBox(
+ width: 250,
+ child: ModelInfo(
+ widget.project,
+ children: [
+ PropertyItem(
+ name: "Task",
+ child: PropertyValue(inference.task),
+ ),
+ Padding(
+ padding: const EdgeInsets.only(left: 12, top: 12, right: 20.0),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ const Text("Width"),
+ Text(nf.format(inference.width))
+ ]
+ ),
+ Slider(
+ value: inference.width.toDouble(),
+ max: 1024.0,
+ min: 64,
+ divisions: (1024-64)~/64,
+ onChanged: (double value) {
+ inference.width = value.toInt();
+ },
+
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.only(left: 12, top: 12, right: 20.0),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ const Text("Height"),
+ Text(nf.format(inference.height))
+ ]
+ ),
+ Slider(
+ value: inference.height.toDouble(),
+ max: 1024.0,
+ min: 64,
+ divisions: (1024-64)~/64,
+ onChanged: (double value) {
+ inference.height = value.toInt();
+ },
+
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.only(left: 12, top: 12, right: 20.0),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ const Text("Rounds"),
+ Text(nf.format(inference.rounds))
+ ]
+ ),
+ Slider(
+ value: inference.rounds.toDouble(),
+ max: 80,
+ min: 1,
+ divisions: (80-1)~/1,
+ onChanged: (double value) {
+ inference.rounds = value.toInt();
+ },
+
+ ),
+ ],
+ ),
+ ),
+ ]
+ ),
+ );
+ }),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ TabBar(
+ isScrollable: true,
+ tabAlignment: TabAlignment.start,
+ controller: _tabController,
+ tabs: const [
+ Tab(text: "Playground"),
+ Tab(text: "Performance metrics"),
+ //Tab(text: "Deploy"),
+ ]
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.only(top: 15.0),
+ child: TabBarView(
+ controller: _tabController,
+ children: const [
+ TTIPlayground(),
+ TTIPerformanceMetricsPage(),
+ //Container(),
+ ]
+ ),
+ )
+ ),
+ ],
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
+
diff --git a/lib/interop/generated_bindings.dart b/lib/interop/generated_bindings.dart
index f37fd89b..08f9547d 100644
--- a/lib/interop/generated_bindings.dart
+++ b/lib/interop/generated_bindings.dart
@@ -92,6 +92,37 @@ class OpenVINO {
late final _freeStatusOrSpeechToText = _freeStatusOrSpeechToTextPtr
.asFunction)>();
+ void freeStatusOrModelResponse(
+ ffi.Pointer status,
+ ) {
+ return _freeStatusOrModelResponse(
+ status,
+ );
+ }
+
+ late final _freeStatusOrModelResponsePtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Void Function(ffi.Pointer)>>(
+ 'freeStatusOrModelResponse');
+ late final _freeStatusOrModelResponse = _freeStatusOrModelResponsePtr
+ .asFunction)>();
+
+ void freeStatusOrWhisperModelResponse(
+ ffi.Pointer status,
+ ) {
+ return _freeStatusOrWhisperModelResponse(
+ status,
+ );
+ }
+
+ late final _freeStatusOrWhisperModelResponsePtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Void Function(ffi.Pointer)>>(
+ 'freeStatusOrWhisperModelResponse');
+ late final _freeStatusOrWhisperModelResponse =
+ _freeStatusOrWhisperModelResponsePtr.asFunction<
+ void Function(ffi.Pointer)>();
+
void freeStatusOrDevices(
ffi.Pointer status,
) {
@@ -465,6 +496,81 @@ class OpenVINO {
late final _llmInferenceClose = _llmInferenceClosePtr
.asFunction Function(CLLMInference)>();
+ ffi.Pointer ttiInferenceOpen(
+ ffi.Pointer model_path,
+ ffi.Pointer device,
+ ) {
+ return _ttiInferenceOpen(
+ model_path,
+ device,
+ );
+ }
+
+ late final _ttiInferenceOpenPtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Pointer Function(ffi.Pointer,
+ ffi.Pointer)>>('ttiInferenceOpen');
+ late final _ttiInferenceOpen = _ttiInferenceOpenPtr.asFunction<
+ ffi.Pointer Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ ffi.Pointer ttiInferencePrompt(
+ CTTIInference instance,
+ ffi.Pointer message,
+ int width,
+ int height,
+ int rounds,
+ ) {
+ return _ttiInferencePrompt(
+ instance,
+ message,
+ width,
+ height,
+ rounds,
+ );
+ }
+
+ late final _ttiInferencePromptPtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Pointer Function(
+ CTTIInference,
+ ffi.Pointer,
+ ffi.Int,
+ ffi.Int,
+ ffi.Int)>>('ttiInferencePrompt');
+ late final _ttiInferencePrompt = _ttiInferencePromptPtr.asFunction<
+ ffi.Pointer Function(
+ CTTIInference, ffi.Pointer, int, int, int)>();
+
+ ffi.Pointer ttiInferenceHasModelIndex(
+ CTTIInference instance,
+ ) {
+ return _ttiInferenceHasModelIndex(
+ instance,
+ );
+ }
+
+ late final _ttiInferenceHasModelIndexPtr = _lookup<
+ ffi
+ .NativeFunction Function(CTTIInference)>>(
+ 'ttiInferenceHasModelIndex');
+ late final _ttiInferenceHasModelIndex = _ttiInferenceHasModelIndexPtr
+ .asFunction Function(CTTIInference)>();
+
+ ffi.Pointer ttiInferenceClose(
+ CLLMInference instance,
+ ) {
+ return _ttiInferenceClose(
+ instance,
+ );
+ }
+
+ late final _ttiInferenceClosePtr =
+ _lookup Function(CLLMInference)>>(
+ 'ttiInferenceClose');
+ late final _ttiInferenceClose = _ttiInferenceClosePtr
+ .asFunction Function(CLLMInference)>();
+
ffi.Pointer graphRunnerOpen(
ffi.Pointer graph,
) {
@@ -569,6 +675,80 @@ class OpenVINO {
late final _graphRunnerStop = _graphRunnerStopPtr
.asFunction Function(CGraphRunner)>();
+ ffi.Pointer speechToTextOpen(
+ ffi.Pointer model_path,
+ ffi.Pointer device,
+ ) {
+ return _speechToTextOpen(
+ model_path,
+ device,
+ );
+ }
+
+ late final _speechToTextOpenPtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Pointer Function(ffi.Pointer,
+ ffi.Pointer)>>('speechToTextOpen');
+ late final _speechToTextOpen = _speechToTextOpenPtr.asFunction<
+ ffi.Pointer Function(
+ ffi.Pointer, ffi.Pointer)>();
+
+ ffi.Pointer speechToTextLoadVideo(
+ CSpeechToText instance,
+ ffi.Pointer video_path,
+ ) {
+ return _speechToTextLoadVideo(
+ instance,
+ video_path,
+ );
+ }
+
+ late final _speechToTextLoadVideoPtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Pointer Function(CSpeechToText,
+ ffi.Pointer)>>('speechToTextLoadVideo');
+ late final _speechToTextLoadVideo = _speechToTextLoadVideoPtr.asFunction<
+ ffi.Pointer Function(CSpeechToText, ffi.Pointer)>();
+
+ ffi.Pointer speechToTextVideoDuration(
+ CSpeechToText instance,
+ ) {
+ return _speechToTextVideoDuration(
+ instance,
+ );
+ }
+
+ late final _speechToTextVideoDurationPtr = _lookup<
+ ffi.NativeFunction Function(CSpeechToText)>>(
+ 'speechToTextVideoDuration');
+ late final _speechToTextVideoDuration = _speechToTextVideoDurationPtr
+ .asFunction Function(CSpeechToText)>();
+
+ ffi.Pointer speechToTextTranscribe(
+ CSpeechToText instance,
+ int start,
+ int duration,
+ ffi.Pointer language,
+ ) {
+ return _speechToTextTranscribe(
+ instance,
+ start,
+ duration,
+ language,
+ );
+ }
+
+ late final _speechToTextTranscribePtr = _lookup<
+ ffi.NativeFunction<
+ ffi.Pointer Function(
+ CSpeechToText,
+ ffi.Int,
+ ffi.Int,
+ ffi.Pointer)>>('speechToTextTranscribe');
+ late final _speechToTextTranscribe = _speechToTextTranscribePtr.asFunction<
+ ffi.Pointer Function(
+ CSpeechToText, int, int, ffi.Pointer)>();
+
ffi.Pointer getAvailableDevices() {
return _getAvailableDevices();
}
@@ -667,12 +847,36 @@ final class Metrics extends ffi.Struct {
external int number_of_input_tokens;
}
+final class TTIMetrics extends ffi.Struct {
+ @ffi.Float()
+ external double load_time;
+
+ @ffi.Float()
+ external double generate_time;
+}
+
+final class StringWithMetrics extends ffi.Struct {
+ external ffi.Pointer string;
+
+ external TTIMetrics metrics;
+}
+
final class Device extends ffi.Struct {
external ffi.Pointer id;
external ffi.Pointer name;
}
+final class TranscriptionChunk extends ffi.Struct {
+ @ffi.Float()
+ external double start_ts;
+
+ @ffi.Float()
+ external double end_ts;
+
+ external ffi.Pointer text;
+}
+
final class Status extends ffi.Struct {
@ffi.Int()
external int status;
@@ -753,6 +957,15 @@ final class StatusOrLLMInference extends ffi.Struct {
typedef CLLMInference = ffi.Pointer;
+final class StatusOrTTIInference extends ffi.Struct {
+ @ffi.Int()
+ external int status;
+
+ external ffi.Pointer message;
+
+ external CLLMInference value;
+}
+
final class StatusOrModelResponse extends ffi.Struct {
@ffi.Int()
external int status;
@@ -764,6 +977,33 @@ final class StatusOrModelResponse extends ffi.Struct {
external ffi.Pointer value;
}
+final class StatusOrWhisperModelResponse extends ffi.Struct {
+ @ffi.Int()
+ external int status;
+
+ external ffi.Pointer message;
+
+ external Metrics metrics;
+
+ external ffi.Pointer value;
+
+ @ffi.Int()
+ external int size;
+
+ external ffi.Pointer text;
+}
+
+final class StatusOrTTIModelResponse extends ffi.Struct {
+ @ffi.Int()
+ external int status;
+
+ external ffi.Pointer message;
+
+ external TTIMetrics metrics;
+
+ external ffi.Pointer value;
+}
+
final class StatusOrDevices extends ffi.Struct {
@ffi.Int()
external int status;
@@ -788,3 +1028,4 @@ typedef LLMInferenceCallbackFunctionFunction = ffi.Void Function(
ffi.Pointer);
typedef DartLLMInferenceCallbackFunctionFunction = void Function(
ffi.Pointer);
+typedef CTTIInference = ffi.Pointer;
diff --git a/lib/interop/openvino_bindings.dart b/lib/interop/openvino_bindings.dart
index e11cc935..d27cd8b7 100644
--- a/lib/interop/openvino_bindings.dart
+++ b/lib/interop/openvino_bindings.dart
@@ -18,6 +18,20 @@ class SerializationOutput {
}
+class Chunk {
+ final double start;
+ final double end;
+ final String text;
+ const Chunk(this.start, this.end, this.text);
+}
+
+class TranscriptionModelResponse {
+ final List chunks;
+ final Metrics metrics;
+ final String text;
+ const TranscriptionModelResponse(this.chunks, this.metrics, this.text);
+}
+
class ModelResponse {
final String content;
final Metrics metrics;
@@ -25,6 +39,14 @@ class ModelResponse {
const ModelResponse(this.content, this.metrics);
}
+class TTIModelResponse {
+ final String content;
+ final TTIMetrics metrics;
+
+ const TTIModelResponse(this.content, this.metrics);
+}
+
+
String getLibraryPath() {
if (Platform.isWindows) {
return "windows_bindings.dll";
diff --git a/lib/interop/speech_to_text.dart b/lib/interop/speech_to_text.dart
index c8635ae1..4f57cb2d 100644
--- a/lib/interop/speech_to_text.dart
+++ b/lib/interop/speech_to_text.dart
@@ -9,72 +9,79 @@ final ov = getBindings();
class SpeechToText {
final Pointer instance;
-
-
SpeechToText(this.instance);
static Future init(String modelPath, String device) async {
- throw UnimplementedError();
- //final result = await Isolate.run(() {
- // final modelPathPtr = modelPath.toNativeUtf8();
- // final devicePtr = device.toNativeUtf8();
- // final status = ov.speechToTextOpen(modelPathPtr, devicePtr);
- // calloc.free(modelPathPtr);
- // calloc.free(devicePtr);
-
- // return status;
- //});
-
- //print("${result.ref.status}, ${result.ref.message}");
- //if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
- // throw "SpeechToText open error: ${result.ref.status} ${result.ref.message.toDartString()}";
- //}
-
- //return SpeechToText(result);
+ final result = await Isolate.run(() {
+ final modelPathPtr = modelPath.toNativeUtf8();
+ final devicePtr = device.toNativeUtf8();
+ final status = ov.speechToTextOpen(modelPathPtr, devicePtr);
+ calloc.free(modelPathPtr);
+ calloc.free(devicePtr);
+
+ return status;
+ });
+
+ print("${result.ref.status}, ${result.ref.message}");
+ if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
+ throw "SpeechToText open error: ${result.ref.status} ${result.ref.message.toDartString()}";
+ }
+
+ return SpeechToText(result);
}
Future loadVideo(String videoPath) async{
- throw UnimplementedError();
- //int instanceAddress = instance.ref.value.address;
- //{
- // final result = await Isolate.run(() {
- // final videoPathPtr = videoPath.toNativeUtf8();
- // final status = ov.speechToTextLoadVideo(Pointer.fromAddress(instanceAddress), videoPathPtr);
- // calloc.free(videoPathPtr);
- // return status;
- // });
-
- // if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
- // throw "SpeechToText LoadVideo error: ${result.ref.status} ${result.ref.message.toDartString()}";
- // }
- //}
-
- //{
- // final result = await Isolate.run(() {
- // final status = ov.speechToTextVideoDuration(Pointer.fromAddress(instanceAddress));
- // return status;
- // });
- // if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
- // throw "SpeechToText VideoDuration error: ${result.ref.status} ${result.ref.message.toDartString()}";
- // }
- // return result.ref.value;
- //}
+ int instanceAddress = instance.ref.value.address;
+ {
+ final result = await Isolate.run(() {
+ final videoPathPtr = videoPath.toNativeUtf8();
+ final status = ov.speechToTextLoadVideo(Pointer.fromAddress(instanceAddress), videoPathPtr);
+ calloc.free(videoPathPtr);
+ return status;
+ });
+
+ if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
+ throw "SpeechToText LoadVideo error: ${result.ref.status} ${result.ref.message.toDartString()}";
+ }
+ }
+
+ {
+ final result = await Isolate.run(() {
+ final status = ov.speechToTextVideoDuration(Pointer.fromAddress(instanceAddress));
+ return status;
+ });
+ if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
+ throw "SpeechToText VideoDuration error: ${result.ref.status} ${result.ref.message.toDartString()}";
+ }
+ return result.ref.value;
+ }
}
- Future transcribe(int start, int duration, String language) async{
- throw UnimplementedError();
- //int instanceAddress = instance.ref.value.address;
- //final result = await Isolate.run(() {
- // final languagePtr = language.toNativeUtf8();
- // final status = ov.speechToTextTranscribe(Pointer.fromAddress(instanceAddress), start, duration, languagePtr);
- // calloc.free(languagePtr);
- // return status;
- //});
-
- //if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
- // throw "SpeechToText LoadVideo error: ${result.ref.status} ${result.ref.message.toDartString()}";
- //}
-
- //return result.ref.value.toDartString();
+ Future transcribe(int start, int duration, String language) async{
+ int instanceAddress = instance.ref.value.address;
+ final result = await Isolate.run(() {
+ final languagePtr = language.toNativeUtf8();
+ final status = ov.speechToTextTranscribe(Pointer.fromAddress(instanceAddress), start, duration, languagePtr);
+ calloc.free(languagePtr);
+ return status;
+ });
+
+ if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
+ throw "SpeechToText LoadVideo error: ${result.ref.status} ${result.ref.message.toDartString()}";
+ }
+
+ List chunks = [];
+ for (int i = 0; i < result.ref.size; i++) {
+ chunks.add(Chunk(
+ result.ref.value[i].start_ts,
+ result.ref.value[i].end_ts,
+ result.ref.value[i].text.toDartString()
+ ));
+ }
+ final metrics = result.ref.metrics;
+ final text = result.ref.text.toDartString();
+ ov.freeStatusOrWhisperModelResponse(result);
+
+ return TranscriptionModelResponse(chunks, metrics, text);
}
}
diff --git a/lib/interop/tti_inference.dart b/lib/interop/tti_inference.dart
new file mode 100644
index 00000000..fbbbc669
--- /dev/null
+++ b/lib/interop/tti_inference.dart
@@ -0,0 +1,77 @@
+import 'dart:ffi';
+import 'dart:isolate';
+
+import 'package:ffi/ffi.dart';
+import 'package:inference/interop/openvino_bindings.dart';
+
+final tti_ov = getBindings();
+
+class TTIInference {
+ final Pointer instance;
+ late bool chatEnabled;
+
+ TTIInference(this.instance) {
+ chatEnabled = hasModelIndex();
+ }
+
+ static Future init(String modelPath, String device) async {
+ final result = await Isolate.run(() {
+ final modelPathPtr = modelPath.toNativeUtf8();
+ final devicePtr = device.toNativeUtf8();
+ final status = tti_ov.ttiInferenceOpen(modelPathPtr, devicePtr);
+ calloc.free(modelPathPtr);
+ calloc.free(devicePtr);
+
+ return status;
+ });
+
+ print("${result.ref.status}, ${result.ref.message}");
+ if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
+ throw "TTIInference open error: ${result.ref.status} ${result.ref.message.toDartString()}";
+ }
+
+ return TTIInference(result);
+ }
+
+ Future prompt(
+ String message, int width, int height, int rounds) async {
+ int instanceAddress = instance.ref.value.address;
+ final result = await Isolate.run(() {
+ final messagePtr = message.toNativeUtf8();
+ final status = tti_ov.ttiInferencePrompt(
+ Pointer.fromAddress(instanceAddress),
+ messagePtr,
+ width,
+ height,
+ rounds);
+ calloc.free(messagePtr);
+ return status;
+ });
+
+ if (StatusEnum.fromValue(result.ref.status) != StatusEnum.OkStatus) {
+ throw "TTIInference prompt error: ${result.ref.status} ${result.ref.message.toDartString()}";
+ }
+
+ return TTIModelResponse(
+ result.ref.value.toDartString(), result.ref.metrics);
+ }
+
+ bool hasModelIndex() {
+ final status = tti_ov.ttiInferenceHasModelIndex(instance.ref.value);
+
+ if (StatusEnum.fromValue(status.ref.status) != StatusEnum.OkStatus) {
+ throw "TTI Chat template error: ${status.ref.status} ${status.ref.message.toDartString()}";
+ }
+
+ return status.ref.value;
+ }
+
+ void close() {
+ final status = tti_ov.ttiInferenceClose(instance.ref.value);
+
+ if (StatusEnum.fromValue(status.ref.status) != StatusEnum.OkStatus) {
+ throw "Close error: ${status.ref.status} ${status.ref.message.toDartString()}";
+ }
+ tti_ov.freeStatus(status);
+ }
+}
diff --git a/lib/main.dart b/lib/main.dart
index 9f019f04..092cccd4 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -6,6 +6,7 @@ import 'package:inference/theme_fluent.dart';
import 'package:inference/providers/preference_provider.dart';
import 'package:inference/providers/project_provider.dart';
import 'package:inference/public_models.dart';
+import 'package:media_kit/media_kit.dart';
import 'package:provider/provider.dart';
@@ -13,7 +14,7 @@ const String title = 'OpenVINO TestDrive';
void testConnection() async {
final dio = Dio(BaseOptions(connectTimeout: Duration(seconds: 10)));
-
+
try {
await dio.get(collections[0].path);
} on DioException catch(ex) {
@@ -25,6 +26,7 @@ void testConnection() async {
}
void main() {
+ MediaKit.ensureInitialized();
testConnection();
runApp(const App());
}
diff --git a/lib/pages/computer_vision/batch_inference.dart b/lib/pages/computer_vision/batch_inference.dart
index d2f34cfa..53c74ff5 100644
--- a/lib/pages/computer_vision/batch_inference.dart
+++ b/lib/pages/computer_vision/batch_inference.dart
@@ -99,7 +99,7 @@ class BatchInference extends StatelessWidget {
),
),
),
- const ModelProperties(),
+ ModelProperties(project: batchInference.imageInference.project),
],
);
}
diff --git a/lib/pages/computer_vision/computer_vision.dart b/lib/pages/computer_vision/computer_vision.dart
index 8c7522c3..715a270e 100644
--- a/lib/pages/computer_vision/computer_vision.dart
+++ b/lib/pages/computer_vision/computer_vision.dart
@@ -2,7 +2,6 @@ import 'package:fluent_ui/fluent_ui.dart';
import 'package:go_router/go_router.dart';
import 'package:inference/pages/computer_vision/batch_inference.dart';
import 'package:inference/pages/computer_vision/live_inference.dart';
-import 'package:inference/pages/models/widgets/grid_container.dart';
import 'package:inference/project.dart';
import 'package:inference/providers/image_inference_provider.dart';
import 'package:inference/providers/preference_provider.dart';
diff --git a/lib/pages/computer_vision/live_inference.dart b/lib/pages/computer_vision/live_inference.dart
index 0b089bfd..9c78f25c 100644
--- a/lib/pages/computer_vision/live_inference.dart
+++ b/lib/pages/computer_vision/live_inference.dart
@@ -135,7 +135,7 @@ class _LiveInferenceState extends State {
],
),
),
- const ModelProperties(),
+ ModelProperties(project: widget.project),
],
);
}
diff --git a/lib/pages/computer_vision/widgets/model_properties.dart b/lib/pages/computer_vision/widgets/model_properties.dart
index d333243f..5d7e932d 100644
--- a/lib/pages/computer_vision/widgets/model_properties.dart
+++ b/lib/pages/computer_vision/widgets/model_properties.dart
@@ -1,70 +1,67 @@
import 'package:fluent_ui/fluent_ui.dart';
+import 'package:inference/project.dart';
import 'package:inference/theme_fluent.dart';
-import 'package:inference/utils.dart';
import 'package:inference/pages/models/widgets/grid_container.dart';
-import 'package:inference/providers/image_inference_provider.dart';
import 'package:intl/intl.dart';
-import 'package:provider/provider.dart';
+import 'package:inference/utils.dart';
class ModelProperties extends StatelessWidget {
- const ModelProperties({super.key});
+ final Project project;
+ const ModelProperties({super.key, required this.project});
@override
Widget build(BuildContext context) {
- return Consumer(builder: (context, inference, child) {
- Locale locale = Localizations.localeOf(context);
- final formatter = NumberFormat.percentPattern(locale.languageCode);
+ Locale locale = Localizations.localeOf(context);
+ final formatter = NumberFormat.percentPattern(locale.languageCode);
- return SizedBox(
- width: 280,
- child: GridContainer(
- padding: const EdgeInsets.symmetric(vertical: 18, horizontal: 24),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const Text("Model parameters", style: TextStyle(
- fontSize: 20,
- )),
- Container(
- padding: const EdgeInsets.only(top: 16),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- ModelProperty(
- title: "Model name",
- value: inference.project.name,
- ),
- ModelProperty(
- title: "Task",
- value: inference.project.taskName(),
- ),
- ModelProperty(
- title: "Architecture",
- value: inference.project.architecture,
- ),
- ModelProperty(
- title: "Size",
- value: inference.project.size?.readableFileSize() ?? "",
- ),
- Builder(
- builder: (context) {
- if (inference.project.tasks.first.performance == null) {
- return Container();
- }
- return ModelProperty(
- title: "Accuracy",
- value: formatter.format(inference.project.tasks.first.performance!.score)
- );
- }
- ),
- ],
+ return SizedBox(
+ width: 280,
+ child: GridContainer(
+ padding: const EdgeInsets.symmetric(vertical: 18, horizontal: 24),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("Model parameters", style: TextStyle(
+ fontSize: 20,
+ )),
+ Container(
+ padding: const EdgeInsets.only(top: 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ModelProperty(
+ title: "Model name",
+ value: project.name,
+ ),
+ ModelProperty(
+ title: "Task",
+ value: project.taskName(),
+ ),
+ ModelProperty(
+ title: "Architecture",
+ value: project.architecture,
+ ),
+ ModelProperty(
+ title: "Size",
+ value: project.size?.readableFileSize() ?? "",
+ ),
+ Builder(
+ builder: (context) {
+ if (project.tasks.first.performance == null) {
+ return Container();
+ }
+ return ModelProperty(
+ title: "Accuracy",
+ value: formatter.format(project.tasks.first.performance!.score)
+ );
+ }
),
- )
- ],
+ ],
+ ),
)
- ),
- );
- }
+ ],
+ )
+ ),
);
}
}
diff --git a/lib/pages/download_model/download_model.dart b/lib/pages/download_model/download_model.dart
new file mode 100644
index 00000000..a6fb94de
--- /dev/null
+++ b/lib/pages/download_model/download_model.dart
@@ -0,0 +1,229 @@
+import 'dart:math';
+
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:go_router/go_router.dart';
+import 'package:inference/deployment_processor.dart';
+import 'package:inference/project.dart';
+import 'package:inference/providers/download_provider.dart';
+import 'package:inference/providers/project_provider.dart';
+import 'package:inference/public_models.dart';
+import 'package:inference/theme_fluent.dart';
+import 'package:intl/intl.dart';
+import 'package:provider/provider.dart';
+
+String formatBytes(int bytes) {
+ return "${NumberFormat("#,##0").format(bytes / pow(1024, 2))} MB";
+}
+
+
+class DownloadPage extends StatelessWidget {
+ final PublicProject project;
+ const DownloadPage({super.key, required this.project});
+
+ @override
+ Widget build(BuildContext context) {
+ return ChangeNotifierProvider(
+ create: (_) => DownloadProvider(),
+ child: DownloadModelPage(project: project),
+ );
+ }
+}
+
+class DownloadModelPage extends StatefulWidget {
+ final PublicProject project;
+ const DownloadModelPage({super.key, required this.project});
+
+ @override
+ State createState() => _DownloadModelPageState();
+}
+
+class _DownloadModelPageState extends State {
+ @override
+ void initState() {
+ super.initState();
+ startDownload();
+ }
+
+ void startDownload() async {
+ final downloadProvider = Provider.of(context, listen: false);
+ final projectProvider = Provider.of(context, listen: false);
+ final router = GoRouter.of(context);
+ late Map files;
+
+ try {
+ files = await listDownloadFiles(widget.project);
+ } catch (e) {
+ await showDialog(context: context, builder: (BuildContext context) => ContentDialog(
+ title: const Text('Model was not found'),
+ actions: [
+ Button(
+ onPressed: () {
+ router.canPop() ? router.pop() : router.go('/home');
+ },
+ child: const Text('Close'),
+ ),
+ ],
+ ));
+ return;
+ }
+
+ try {
+ downloadProvider.onCancel = () => deleteProjectData(widget.project);
+ await downloadProvider.queue(files, widget.project.modelInfo?.collection.token);
+ projectProvider.addProject(widget.project);
+ await getAdditionalModelInfo(widget.project);
+ projectProvider.completeLoading(widget.project);
+ router.go("/models/inference", extra: widget.project);
+ } catch(e) {
+ if (mounted) {
+ await showDialog(context: context, builder: (BuildContext context) => ContentDialog(
+ title: Text('An error occurred trying to download ${widget.project.name}'),
+ content: Text(e.toString()),
+ actions: [
+ Button(
+ onPressed: () {
+ router.canPop() ? router.pop() : router.go('/home');
+ },
+ child: const Text('Close'),
+ ),
+ ],
+ ));
+ }
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = FluentTheme.of(context);
+ return ScaffoldPage(
+ padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8.0),
+ header: Container(
+ decoration: BoxDecoration(
+ border: Border(
+ bottom: BorderSide(
+ color: theme.resources.controlStrokeColorDefault,
+ width: 1.0
+ )
+ )
+ ),
+ height: 56,
+ padding: const EdgeInsets.symmetric(horizontal: 12.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Row(
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(left: 12.0, bottom: 8),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(4.0),
+ child: Container(
+ width: 40,
+ height: 40,
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ image: widget.project.thumbnailImage(),
+ fit: BoxFit.fitWidth),
+ ),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Text(widget.project.name,
+ style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
+ ),
+ ),
+ ],
+ ),
+ Button(child: const Text("Close"), onPressed: () {
+ GoRouter.of(context).canPop() ? GoRouter.of(context).pop() : GoRouter.of(context).go('/home');
+ }),
+ ],
+ ),
+ ),
+ content: Row(
+ children: [
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Consumer(builder: (context, downloadProvider, child) {
+ final stats = downloadProvider.stats;
+ return Column(
+ children: [
+ ProgressRing(
+ value: stats.percentage * 100,
+ strokeWidth: 8,
+ ),
+ SizedBox(
+ width: 140,
+ child: Padding(
+ padding: const EdgeInsets.only(top: 8.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(formatBytes(stats.received), textAlign: TextAlign.end,),
+ const Text("/"),
+ Text(formatBytes(stats.total))
+ ],
+ ),
+ ),
+ ),
+ const Padding(
+ padding: EdgeInsets.all(8.0),
+ child: Text("Downloading model weights"),
+ )
+ ]
+ );
+ }
+ ),
+ )
+ ],
+ ),
+ ),
+ Container(
+ width: 280,
+ decoration: BoxDecoration(
+ border: Border(
+ left: BorderSide(
+ color: theme.resources.controlStrokeColorDefault,
+ width: 1.0,
+ ),
+ ),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 24),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Padding(
+ padding: EdgeInsets.symmetric(vertical: 18.0),
+ child: Text("Model parameters", style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600)),
+ ),
+ const Padding(
+ padding: EdgeInsets.only(top: 16),
+ child: Text("Model name", style: TextStyle(fontSize: 14),),
+ ),
+ Padding(padding: const EdgeInsets.only(top: 4),
+ child: Text(widget.project.modelId, style: const TextStyle(fontSize: 14, color: foreground3Color),),
+ ),
+ const Padding(padding: EdgeInsets.only(top: 16),
+ child: Text("Task", style: TextStyle(fontSize: 14),),
+ ),
+ Padding(padding: const EdgeInsets.only(top: 4),
+ child: Text(widget.project.taskName(), style: const TextStyle(fontSize: 14, color: foreground3Color),),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ )
+ );
+ }
+}
diff --git a/lib/pages/home/widgets/featured_card.dart b/lib/pages/home/widgets/featured_card.dart
index 7e24a0c6..c756ac18 100644
--- a/lib/pages/home/widgets/featured_card.dart
+++ b/lib/pages/home/widgets/featured_card.dart
@@ -1,11 +1,20 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:inference/importers/manifest_importer.dart';
import 'package:inference/widgets/elevation.dart';
+import 'package:go_router/go_router.dart';
class FeaturedCard extends StatelessWidget {
final Model model;
const FeaturedCard({required this.model, super.key});
+ void downloadModel(BuildContext context) {
+ model.convertToProject().then((project) {
+ if (context.mounted) {
+ GoRouter.of(context).go('/models/download', extra: project);
+ }
+ });
+ }
+
@override
Widget build(BuildContext context) {
final theme = FluentTheme.of(context);
@@ -72,7 +81,7 @@ class FeaturedCard extends StatelessWidget {
alignment: Alignment.centerRight,
child: Padding(
padding: const EdgeInsets.only(top: 2),
- child: IconButton(icon: const Icon(FluentIcons.pop_expand, size: 14), onPressed: () {}),
+ child: IconButton(icon: const Icon(FluentIcons.pop_expand, size: 14), onPressed: () => downloadModel(context)),
),
),
],
diff --git a/lib/pages/import/import.dart b/lib/pages/import/import.dart
index bf3f540f..82af278c 100644
--- a/lib/pages/import/import.dart
+++ b/lib/pages/import/import.dart
@@ -42,6 +42,7 @@ class _ImportPageState extends State {
@override
Widget build(BuildContext context) {
final theme = FluentTheme.of(context);
+ final router = GoRouter.of(context);
return ScaffoldPage.scrollable(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8.0),
header: Container(
@@ -68,11 +69,14 @@ class _ImportPageState extends State {
Row(
children: [
FilledButton(onPressed: selectedModel == null ? (null) : () {
- GoRouter.of(context).go('/models/download', extra: selectedModel);
+ selectedModel?.convertToProject().then((project) {
+ router.go('/models/download', extra: project);
+ });
+
}, child: const Text('Import selected model'),),
Padding(
padding: const EdgeInsets.only(left: 8.0),
- child: Button(child: const Text('Close'), onPressed: () { GoRouter.of(context).pop(); }),
+ child: Button(child: const Text('Close'), onPressed: () { router.pop(); }),
)
],
)
@@ -89,9 +93,12 @@ class _ImportPageState extends State {
children: [
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 280),
- child: SearchBar(onChange: (value) { setState(() {
- searchValue = value;
- }); }, placeholder: 'Find a model',),
+ child: Semantics(
+ label: 'Find a model',
+ child: SearchBar(onChange: (value) { setState(() {
+ searchValue = value;
+ }); }, placeholder: 'Find a model',),
+ ),
),
Padding(
padding: const EdgeInsets.only(left: 8),
@@ -173,4 +180,4 @@ class _ImportPageState extends State {
]
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/pages/models/inference.dart b/lib/pages/models/inference.dart
index 5e7231e9..6b9a64df 100644
--- a/lib/pages/models/inference.dart
+++ b/lib/pages/models/inference.dart
@@ -1,6 +1,7 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:inference/pages/computer_vision/computer_vision.dart';
import 'package:inference/pages/text_generation/text_generation.dart';
+import 'package:inference/pages/transcription/transcription.dart';
import 'package:inference/project.dart';
class InferencePage extends StatelessWidget {
@@ -15,6 +16,8 @@ class InferencePage extends StatelessWidget {
case ProjectType.text:
return TextGenerationPage(project);
case ProjectType.speech:
+ return TranscriptionPage(project);
+ case ProjectType.textToImage:
return Container();
}
}
diff --git a/lib/pages/models/widgets/model_card.dart b/lib/pages/models/widgets/model_card.dart
index e3f0a4c5..d6817f97 100644
--- a/lib/pages/models/widgets/model_card.dart
+++ b/lib/pages/models/widgets/model_card.dart
@@ -22,7 +22,13 @@ class _ModelCardState extends State{
final theme = FluentTheme.of(context);
return GestureDetector(
- onTap: () => GoRouter.of(context).go("/models/inference", extra: widget.project),
+ onTap: () {
+ if (widget.project.isDownloaded) {
+ GoRouter.of(context).go("/models/inference", extra: widget.project);
+ } else {
+ GoRouter.of(context).go("/models/download", extra: widget.project);
+ }
+ },
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: Elevation(
diff --git a/lib/pages/transcription/performance_metrics.dart b/lib/pages/transcription/performance_metrics.dart
new file mode 100644
index 00000000..0abf3e19
--- /dev/null
+++ b/lib/pages/transcription/performance_metrics.dart
@@ -0,0 +1,99 @@
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:inference/pages/computer_vision/widgets/horizontal_rule.dart';
+import 'package:inference/pages/computer_vision/widgets/model_properties.dart';
+import 'package:inference/pages/models/widgets/grid_container.dart';
+import 'package:inference/pages/transcription/providers/speech_inference_provider.dart';
+import 'package:inference/project.dart';
+import 'package:inference/widgets/performance_tile.dart';
+import 'package:intl/intl.dart';
+import 'package:provider/provider.dart';
+
+class PerformanceMetrics extends StatelessWidget {
+ final Project project;
+ const PerformanceMetrics({super.key, required this.project});
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ children: [
+ Expanded(
+ child: GridContainer(
+ child: Consumer(
+ builder: (context, inference, child) {
+ final metrics = inference.metrics;
+ if (metrics == null) {
+ return Container();
+ }
+
+ Locale locale = Localizations.localeOf(context);
+ final nf = NumberFormat.decimalPatternDigits(
+ locale: locale.languageCode, decimalDigits: 0);
+
+ return Padding(
+ padding: const EdgeInsets.symmetric(vertical: 80),
+ child: Center(
+ child: SizedBox(
+ width: 887,
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ PerformanceTile(
+ title: "Time to first token (TTFT)",
+ value: nf.format(metrics.ttft),
+ unit: "ms",
+ tall: true,
+ ),
+ PerformanceTile(
+ title: "Time per output token (TPOT)",
+ value: nf.format(metrics.tpot),
+ unit: "ms",
+ tall: true,
+ ),
+ PerformanceTile(
+ title: "Generate total duration",
+ value: nf.format(metrics.generateTime),
+ unit: "ms",
+ tall: true,
+ ),
+ ],
+ ),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16),
+ child: HorizontalRule(),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ PerformanceTile(
+ title: "Load time",
+ value: nf.format(metrics.loadTime),
+ unit: "ms",
+ ),
+ PerformanceTile(
+ title: "Detokenization duration",
+ value: nf.format(metrics.detokenizationTime),
+ unit: "ms",
+ ),
+ PerformanceTile(
+ title: "Throughput",
+ value: nf.format(metrics.throughput),
+ unit: "tokens/sec",
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+ ),
+ ),
+ ),
+ ModelProperties(project: project),
+ ],
+ );
+ }
+}
diff --git a/lib/pages/transcription/playground.dart b/lib/pages/transcription/playground.dart
new file mode 100644
index 00000000..c2224817
--- /dev/null
+++ b/lib/pages/transcription/playground.dart
@@ -0,0 +1,185 @@
+import 'dart:async';
+
+import 'package:file_picker/file_picker.dart';
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:inference/pages/computer_vision/widgets/model_properties.dart';
+import 'package:inference/pages/models/widgets/grid_container.dart';
+import 'package:inference/pages/transcription/widgets/subtitles.dart';
+import 'package:inference/pages/transcription/widgets/transcription.dart';
+import 'package:inference/pages/transcription/utils/message.dart';
+import 'package:inference/project.dart';
+import 'package:inference/pages/transcription/providers/speech_inference_provider.dart';
+import 'package:inference/theme_fluent.dart';
+import 'package:inference/widgets/controls/drop_area.dart';
+import 'package:inference/widgets/controls/no_outline_button.dart';
+import 'package:inference/widgets/device_selector.dart';
+import 'package:media_kit/media_kit.dart';
+import 'package:media_kit_video/media_kit_video.dart';
+import 'package:provider/provider.dart';
+
+class Playground extends StatefulWidget {
+ final Project project;
+ const Playground({super.key, required this.project});
+
+ @override
+ State createState() => _PlaygroundState();
+}
+
+class _PlaygroundState extends State with TickerProviderStateMixin{
+ final player = Player();
+ late final controller = VideoController(player);
+ int subtitleIndex = 0;
+ StreamSubscription? listener;
+
+
+ void showUploadMenu() async {
+ FilePickerResult? result = await FilePicker.platform.pickFiles(type: FileType.video);
+
+ if (result != null) {
+ uploadFile(result.files.single.path!);
+ }
+ }
+
+ void positionListener(Duration position) {
+ int index = (position.inSeconds / transcriptionPeriod).floor();
+ if (index != subtitleIndex) {
+ final inference = Provider.of(context, listen: false);
+ inference.skipTo(index);
+ setState(() {
+ subtitleIndex = index;
+ });
+ }
+ }
+
+ void initializeVideoAndListeners(String source) async {
+ await listener?.cancel();
+ player.open(Media(source));
+ player.setVolume(0); // TODO: Disable this for release. This is for our sanity
+ listener = player.stream.position.listen(positionListener);
+ }
+
+ void uploadFile(String file) async {
+ final inference = Provider.of(context, listen: false);
+ await inference.loadVideo(file);
+ initializeVideoAndListeners(file);
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ final inference = Provider.of(context, listen: false);
+ if (inference.videoPath != null) {
+ initializeVideoAndListeners(inference.videoPath!);
+ }
+ }
+
+ @override
+ void dispose() {
+ player.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = FluentTheme.of(context);
+ return Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ SizedBox(
+ height: 64,
+ child: GridContainer(
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Row(
+ children: [
+ NoOutlineButton(
+ onPressed: showUploadMenu,
+ child: Row(
+ children: [
+ const Text("Choose video"),
+ const Padding(
+ padding: EdgeInsets.only(left: 8),
+ child: Icon(FluentIcons.chevron_down, size: 12),
+ ),
+ ],
+ ),
+ ),
+ const DeviceSelector(),
+ ],
+ ),
+ ),
+ ),
+ ),
+ Consumer(
+ builder: (context, inference, child) {
+ return Expanded(
+ child: Builder(
+ builder: (context) {
+ return DropArea(
+ type: "video",
+ showChild: inference.videoPath != null,
+ onUpload: (String file) { uploadFile(file); },
+ extensions: const [],
+ child: Builder(
+ builder: (context) {
+ if (!inference.loaded.isCompleted) {
+ return Center(child: Image.asset('images/intel-loading.gif', width: 100));
+ }
+ return Row(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Expanded(
+ child: GridContainer(
+ color: backgroundColor.of(theme),
+ child: Stack(
+ alignment: Alignment.bottomCenter,
+ children: [
+ Video(controller: controller),
+ Subtitles(
+ transcription: inference.transcription?.data,
+ subtitleIndex: subtitleIndex,
+ ),
+ ]
+ ),
+ ),
+ ),
+ SizedBox(
+ width: 360,
+ child: GridContainer(
+ color: backgroundColor.of(theme),
+ child: Builder(
+ builder: (context) {
+ if (inference.transcription == null) {
+ return Container();
+ }
+ return Transcription(
+ onSeek: player.seek,
+ transcription: inference.transcription!,
+ messages: Message.parse(inference.transcription!.data, transcriptionPeriod),
+ );
+ }
+ ),
+ ),
+ )
+ ],
+ );
+ }
+ ),
+ );
+ }
+ ),
+ );
+ }
+ )
+ ],
+ ),
+ ),
+ ModelProperties(project: widget.project),
+ ]
+ );
+ }
+}
+
diff --git a/lib/pages/transcription/providers/speech_inference_provider.dart b/lib/pages/transcription/providers/speech_inference_provider.dart
new file mode 100644
index 00000000..2f9a7895
--- /dev/null
+++ b/lib/pages/transcription/providers/speech_inference_provider.dart
@@ -0,0 +1,121 @@
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:inference/interop/openvino_bindings.dart';
+import 'package:inference/interop/speech_to_text.dart';
+import 'package:inference/pages/transcription/utils/metrics.dart';
+import 'package:inference/pages/transcription/utils/section.dart';
+import 'package:inference/project.dart';
+
+
+const transcriptionPeriod = 10;
+
+class SpeechInferenceProvider extends ChangeNotifier {
+ Completer loaded = Completer();
+
+
+ Project? _project;
+ String? _device;
+
+ String? _videoPath;
+ String? get videoPath => _videoPath;
+
+ bool forceStop = false;
+
+ bool get videoLoaded => _videoPath != null;
+
+ DynamicRangeLoading>? transcription;
+ Future? activeTranscriptionProcess;
+ DMetrics? metrics;
+
+ bool get transcriptionComplete {
+ return transcription?.complete ?? false;
+ }
+
+ String _language = "";
+
+ String get language => _language;
+ set language(String val) {
+ _language = val;
+ notifyListeners();
+ }
+
+ SpeechToText? _inference;
+
+ SpeechInferenceProvider(Project? project, String? device) {
+ _project = project;
+ _device = device;
+
+ if (project != null && device != null) {
+ SpeechToText.init(project.storagePath, device).then((instance) {
+ _inference = instance;
+ loaded.complete();
+ notifyListeners();
+ });
+ }
+ }
+
+ void skipTo(int index) {
+ transcription!.skipTo(index);
+ }
+
+ Future loadVideo(String path) async {
+ await loaded.future;
+ forceStop = true;
+ await activeTranscriptionProcess;
+ _videoPath = path;
+ final duration = await _inference!.loadVideo(path);
+ final sections = (duration / transcriptionPeriod).ceil();
+ transcription = DynamicRangeLoading>(Section(0, sections));
+ activeTranscriptionProcess = startTranscribing();
+ notifyListeners();
+ }
+
+ void addMetrics(TranscriptionModelResponse response) {
+ if (metrics == null) {
+ metrics = DMetrics.fromCMetrics(response.metrics);
+ } else {
+ metrics!.addCMetrics(response.metrics);
+ }
+ notifyListeners();
+ }
+
+ Future startTranscribing() async {
+ if (transcription == null) {
+ throw Exception("Can't transcribe before loading video");
+ }
+
+ forceStop = false;
+
+ while (!forceStop && (!transcription!.complete)) {
+ if (transcription == null) {
+ return;
+ }
+ await transcription!.process((int i) {
+ final request = transcribe(i * transcriptionPeriod, transcriptionPeriod);
+ request.then(addMetrics);
+ return request;
+ });
+ if (hasListeners) {
+ notifyListeners();
+ }
+ }
+ }
+
+ Future transcribe(int start, int duration) async {
+ await loaded.future;
+ return await _inference!.transcribe(start, duration, _language);
+ }
+
+ bool sameProps(Project? project, String? device) {
+ return _project == project && _device == device;
+ }
+
+ @override
+ void dispose() async {
+ forceStop = true;
+ await activeTranscriptionProcess;
+ super.dispose();
+ }
+
+}
diff --git a/lib/pages/transcription/transcription.dart b/lib/pages/transcription/transcription.dart
new file mode 100644
index 00000000..46f54af6
--- /dev/null
+++ b/lib/pages/transcription/transcription.dart
@@ -0,0 +1,121 @@
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:go_router/go_router.dart';
+import 'package:inference/project.dart';
+import 'package:inference/providers/preference_provider.dart';
+import 'package:inference/pages/transcription/providers/speech_inference_provider.dart';
+import 'package:inference/pages/transcription/performance_metrics.dart';
+import 'package:inference/pages/transcription/playground.dart';
+import 'package:provider/provider.dart';
+
+class TranscriptionPage extends StatefulWidget {
+ final Project project;
+ const TranscriptionPage(this.project, {super.key});
+
+ @override
+ State createState() => _TranscriptionPageState();
+}
+
+class _TranscriptionPageState extends State {
+
+
+ int selected = 0;
+ @override
+ Widget build(BuildContext context) {
+ final theme = FluentTheme.of(context);
+ final updatedTheme = theme.copyWith(
+ navigationPaneTheme: theme.navigationPaneTheme.merge(NavigationPaneThemeData(
+ backgroundColor: theme.scaffoldBackgroundColor,
+ ))
+ );
+ return ChangeNotifierProxyProvider(
+ lazy: false,
+ create: (_) {
+ final device = Provider.of(context, listen: false).device;
+ return SpeechInferenceProvider(widget.project, device);
+ },
+ update: (_, preferences, imageInferenceProvider) {
+ if (imageInferenceProvider != null && imageInferenceProvider.sameProps(widget.project, preferences.device)) {
+ return imageInferenceProvider;
+ }
+ return SpeechInferenceProvider(widget.project, preferences.device);
+ },
+ child: Stack(
+ children: [
+ FluentTheme(
+ data: updatedTheme,
+ child: NavigationView(
+ pane: NavigationPane(
+ size: const NavigationPaneSize(topHeight: 64),
+ header: Row(
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(left: 12.0),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(4.0),
+ child: Container(
+ width: 40,
+ height: 40,
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ image: widget.project.thumbnailImage(),
+ fit: BoxFit.cover),
+ ),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Text(widget.project.name,
+ style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
+ ),
+ ),
+ ],
+ ),
+ //customPane: CustomNavigationPane(),
+ selected: selected,
+ onChanged: (i) => setState(() {selected = i;}),
+ displayMode: PaneDisplayMode.top,
+ items: [
+ PaneItem(
+ icon: const Icon(FluentIcons.processing),
+ title: const Text("Playground"),
+ body: Playground(project: widget.project),
+ ),
+ PaneItem(
+ icon: const Icon(FluentIcons.line_chart),
+ title: const Text("Performance metrics"),
+ body: PerformanceMetrics(project: widget.project),
+ ),
+ ],
+ )
+ ),
+ ),
+ SizedBox(
+ height: 64,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 25),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(4),
+ child: OutlinedButton(
+ style: ButtonStyle(
+ shape:WidgetStatePropertyAll(RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(4.0),
+ side: const BorderSide(color: Color(0XFF545454)),
+ )),
+ ),
+ child: const Text("Close"),
+ onPressed: () => GoRouter.of(context).go("/models"),
+ ),
+ ),
+ ]
+ ),
+ ),
+ )
+ ],
+ )
+ );
+ }
+}
diff --git a/lib/pages/transcription/utils/message.dart b/lib/pages/transcription/utils/message.dart
new file mode 100644
index 00000000..95687320
--- /dev/null
+++ b/lib/pages/transcription/utils/message.dart
@@ -0,0 +1,38 @@
+import 'dart:async';
+
+import 'package:inference/interop/openvino_bindings.dart';
+
+class Message {
+ String message;
+ final Duration position;
+
+ Message(this.message, this.position);
+
+ static List parse(Map> transcriptions, int indexDuration) {
+ final indices = transcriptions.keys.toList()..sort();
+ if (indices.isEmpty) {
+ return [];
+ }
+
+ List output = [];
+
+ bool lastChunkIsOpenEnded = false;
+
+ for (int i in indices) {
+ if (transcriptions[i] is Future) {
+ continue;
+ }
+ final part = transcriptions[i] as TranscriptionModelResponse;
+ for (final chunk in part.chunks) {
+ String text = chunk.text;
+ if (lastChunkIsOpenEnded) {
+ output.last.message += text;
+ } else {
+ output.add(Message(text.substring(1), Duration(seconds: chunk.start.toInt())));
+ }
+ lastChunkIsOpenEnded = text[text.length - 1] != ".";
+ }
+ }
+ return output;
+ }
+}
diff --git a/lib/pages/transcription/utils/metrics.dart b/lib/pages/transcription/utils/metrics.dart
new file mode 100644
index 00000000..481c9f30
--- /dev/null
+++ b/lib/pages/transcription/utils/metrics.dart
@@ -0,0 +1,54 @@
+import 'package:inference/interop/generated_bindings.dart';
+
+class DMetrics {
+ double loadTime;
+ double generateTime;
+ double tokenizationTime;
+ double detokenizationTime;
+ double ttft;
+ double tpot;
+ double throughput;
+ int numberOfGeneratedTokens;
+ int numberOfInputTokens;
+
+ int n = 1; // number of added metrics
+
+ DMetrics({
+ required this.loadTime,
+ required this.generateTime,
+ required this.tokenizationTime,
+ required this.detokenizationTime,
+ required this.ttft,
+ required this.tpot,
+ required this.throughput,
+ required this.numberOfGeneratedTokens,
+ required this.numberOfInputTokens,
+ });
+
+ void addCMetrics(Metrics metrics) {
+ //loadTime = metrics.load_time;
+ generateTime += metrics.generate_time;
+ tokenizationTime += metrics.tokenization_time;
+ detokenizationTime += metrics.detokenization_time;
+ ttft = (ttft * (n / (n + 1))) + metrics.ttft / n;
+ tpot = (tpot * (n / (n + 1))) + metrics.tpot / n;
+ throughput = (throughput * (n / (n + 1))) + metrics.throughput / n;
+ numberOfGeneratedTokens += metrics.number_of_generated_tokens;
+ numberOfInputTokens += metrics.number_of_input_tokens;
+ n += 1;
+ }
+
+ factory DMetrics.fromCMetrics(Metrics metrics) {
+ return DMetrics(
+ loadTime: metrics.load_time,
+ generateTime: metrics.generate_time,
+ tokenizationTime: metrics.tokenization_time,
+ detokenizationTime: metrics.detokenization_time,
+ ttft: metrics.ttft,
+ tpot: metrics.tpot,
+ throughput: metrics.throughput,
+ numberOfGeneratedTokens: metrics.number_of_generated_tokens,
+ numberOfInputTokens: metrics.number_of_input_tokens,
+ );
+ }
+}
diff --git a/lib/pages/transcription/utils/section.dart b/lib/pages/transcription/utils/section.dart
new file mode 100644
index 00000000..5c731b13
--- /dev/null
+++ b/lib/pages/transcription/utils/section.dart
@@ -0,0 +1,99 @@
+void moveToFront(List list, I item) {
+ list.remove(item);
+ list.insert(0, item);
+}
+
+void moveToEnd(List list, I item) {
+ list.remove(item);
+ list.add(item);
+}
+
+class DynamicRangeLoading {
+ List sections = [];
+ int? size;
+ Map data = {};
+
+ DynamicRangeLoading(Section section): sections = [section], size = section.end;
+
+ Section get activeSection => sections.first;
+
+ // The incomplete sections will always be in front
+ bool get complete => activeSection.complete;
+
+ void skipTo(int i) {
+ for (var section in sections) {
+ if (section.contains(i)) {
+ if (i > section.index) {
+ // Section has not progressed until the requested index
+ // Split the section and move the new section to the front
+ final newSection = section.split(i);
+ sections.insert(0, newSection);
+ } else {
+ // Section is further ahead than requested skipTo
+ // move section to front since that work has higher prio
+ if (!section.complete && section != activeSection) {
+ moveToFront(sections, section);
+ }
+ }
+ return;
+ }
+ }
+
+ throw Exception("Out of range");
+ }
+
+ int getNextIndex() {
+ if (complete) {
+ throw Exception("Cannot get next index. All work is done");
+ }
+ return activeSection.index;
+ }
+
+ void pumpIndex() {
+ if (activeSection.pump()) {
+ //activeSection has ended
+ if (sections.length > 1) {
+ moveToEnd(sections,activeSection);
+ }
+ }
+ }
+
+ Future process(Future Function(int) func) async{
+ final index = getNextIndex();
+ final val = await func(index);
+ data[index] = val;
+ pumpIndex();
+ return val;
+ }
+
+ void setData(I value) {
+ data[activeSection.index] = value;
+ activeSection.index += 1;
+ }
+}
+
+class Section {
+ int begin;
+ int? end;
+ int index;
+
+ Section(this.begin, this.end): index = begin;
+
+ bool contains(int i) => begin <= i && (end == null ? true : i < end!);
+
+ Section split(int i) {
+ final newSection = Section(i, end);
+ end = i;
+ return newSection;
+ }
+
+ bool get complete => index == end;
+
+ //returns false if there is still work to do in the section
+ bool pump() {
+ if (end == null || index < end!) {
+ index += 1;
+ }
+ return complete;
+ }
+}
diff --git a/lib/pages/transcription/widgets/paragraph.dart b/lib/pages/transcription/widgets/paragraph.dart
new file mode 100644
index 00000000..c6ca4f16
--- /dev/null
+++ b/lib/pages/transcription/widgets/paragraph.dart
@@ -0,0 +1,98 @@
+
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:inference/theme_fluent.dart';
+import '../utils/message.dart';
+
+String formatDuration(int totalSeconds) {
+ final duration = Duration(seconds: totalSeconds);
+ final minutes = duration.inMinutes;
+ final seconds = totalSeconds % 60;
+
+ final minutesString = '$minutes'.padLeft(2, '0');
+ final secondsString = '$seconds'.padLeft(2, '0');
+ return '$minutesString:$secondsString';
+}
+
+class Paragraph extends StatefulWidget {
+ final Function(Duration)? onSeek;
+ final Message message;
+ final String? highlightedText;
+
+ const Paragraph({super.key, required this.message, this.onSeek, this.highlightedText});
+
+ @override
+ State createState() => _ParagraphState();
+}
+
+class _ParagraphState extends State {
+ bool hover = false;
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = FluentTheme.of(context);
+ List pieces = [];
+ if (widget.highlightedText != null) {
+ final pattern = RegExp(widget.highlightedText!, caseSensitive: false);
+ final sections = widget.message.message.split(pattern);
+ if (sections.isNotEmpty) {
+ pieces.add(TextSpan(text: sections.first));
+ for (int i = 1; i < sections.length; i++) {
+ pieces.add(
+ TextSpan(
+ text: widget.highlightedText!,
+ style: TextStyle(backgroundColor: theme.accentColor),
+ )
+ );
+ pieces.add(TextSpan(text: sections[i]));
+ }
+ }
+ } else {
+ pieces.add(TextSpan(text: widget.message.message));
+ }
+ return MouseRegion(
+ onEnter: (_) {
+ setState(() => hover = true);
+ },
+ onExit: (_) {
+ setState(() => hover = false);
+ },
+ child: GestureDetector(
+ onTap: () {
+ widget.onSeek?.call(widget.message.position);
+ },
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 4),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Align(
+ alignment: Alignment.bottomRight,
+ child: Text(formatDuration(widget.message.position.inSeconds),
+ style: TextStyle(
+ fontSize: 9,
+ color: subtleTextColor.of(theme),
+ )
+ )
+ ),
+ Container(
+ decoration: BoxDecoration(
+ color: hover ? subtleTextColor.of(theme).withOpacity(0.3) : null,
+ borderRadius: const BorderRadius.all(Radius.circular(4)),
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
+ child: RichText(
+ text: TextSpan(
+ style: TextStyle(
+ color: theme.inactiveColor
+ ),
+ children: pieces
+ )
+ )
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/transcription/widgets/subtitles.dart b/lib/pages/transcription/widgets/subtitles.dart
new file mode 100644
index 00000000..da17b0c9
--- /dev/null
+++ b/lib/pages/transcription/widgets/subtitles.dart
@@ -0,0 +1,60 @@
+import 'dart:async';
+
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:inference/interop/openvino_bindings.dart';
+
+class Subtitles extends StatelessWidget {
+ const Subtitles({
+ super.key,
+ required this.transcription,
+ required this.subtitleIndex,
+ });
+
+ final Map>? transcription;
+ final int subtitleIndex;
+
+ static const double fontSize = 18;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(left: 8, right: 8, bottom: 60),
+ child: SizedBox(
+ height: 100,
+ child: Builder(
+ builder: (context) {
+ if (transcription == null ) {
+ return Container();
+ }
+ if (transcription![subtitleIndex] is TranscriptionModelResponse) {
+ final text = (transcription![subtitleIndex] as TranscriptionModelResponse).text;
+ return Stack(
+ alignment: Alignment.bottomCenter,
+ children: [
+ Text(text,
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: fontSize,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.black,
+ )
+ ),
+ Text(text,
+ textAlign: TextAlign.center,
+ style: const TextStyle(
+ fontSize: fontSize,
+ color: Colors.white,
+ )
+ )
+ ],
+ );
+ }
+ return Container();
+ }
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/transcription/widgets/transcription.dart b/lib/pages/transcription/widgets/transcription.dart
new file mode 100644
index 00000000..b02fcdc2
--- /dev/null
+++ b/lib/pages/transcription/widgets/transcription.dart
@@ -0,0 +1,141 @@
+import 'dart:async';
+import 'dart:io';
+
+import 'package:file_picker/file_picker.dart';
+import 'package:fluent_ui/fluent_ui.dart';
+import 'package:inference/interop/openvino_bindings.dart';
+import 'package:inference/pages/transcription/utils/message.dart';
+import 'package:inference/pages/transcription/utils/section.dart';
+import 'package:inference/pages/transcription/widgets/paragraph.dart';
+import 'package:inference/widgets/controls/search_bar.dart';
+
+
+class Transcription extends StatefulWidget {
+ final DynamicRangeLoading>? transcription;
+ final Function(Duration)? onSeek;
+ final List messages;
+ const Transcription({super.key, this.onSeek, this.transcription, required this.messages});
+
+ @override
+ State createState() => _TranscriptionState();
+}
+
+class _TranscriptionState extends State {
+ final List _paragraphKeys = [];
+ final ScrollController _scrollController = ScrollController();
+ final GlobalKey scrollKey = GlobalKey();
+ String? searchText;
+
+ void saveTranscript() async {
+ final file = await FilePicker.platform.saveFile(
+ dialogTitle: "Please select an output file:",
+ fileName: "transcription.txt",
+ );
+ if (file == null){
+ return;
+ }
+
+ String contents = "";
+ final indices = widget.transcription!.data.keys.toList()..sort();
+ for (int i in indices) {
+ final part = widget.transcription!.data[i] as TranscriptionModelResponse;
+ for (final chunk in part.chunks) {
+ contents += chunk.text;
+ }
+ }
+
+ await File(file).writeAsString(contents);
+ }
+
+ void search(String text) {
+ setState(() {
+ searchText = text;
+ });
+
+ final pattern = RegExp(text, caseSensitive: false);
+ int? index;
+ for (int i = 0; i < widget.messages.length; i++) {
+ if (widget.messages[i].message.contains(pattern)) {
+ index = i;
+ break;
+ }
+
+ }
+ if (index != null){
+ final context = _paragraphKeys[index].currentContext;
+
+ if (context != null) {
+ final renderBox = context.findRenderObject() as RenderBox?;
+ if (renderBox != null) {
+ final position = renderBox.localToGlobal(Offset.zero, ancestor: scrollKey.currentContext?.findRenderObject());
+ final offset = _scrollController.offset + position.dy;
+ _scrollController.animateTo(
+ offset,
+ duration: const Duration(milliseconds: 500),
+ curve: Curves.easeInOut,
+ );
+ }
+ }
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(vertical: 25, horizontal: 14),
+ child: Row(
+ children: [
+ SearchBar(onChange: search, placeholder: "Search in transcript",),
+ Padding(
+ padding: const EdgeInsets.only(left: 8.0),
+ child: Tooltip(
+ message: widget.transcription!.complete
+ ? "Download transcript"
+ : "Transcribing...",
+ child: Button(
+ onPressed: widget.transcription?.complete ?? false
+ ? () => saveTranscript()
+ : null,
+ child: const Padding(
+ padding: EdgeInsets.symmetric(vertical: 2),
+ child: Icon(FluentIcons.download),
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ Expanded(
+ child: SingleChildScrollView(
+ key: scrollKey,
+ controller: _scrollController,
+ child: Padding(
+ padding: const EdgeInsets.only(left: 10, right: 18),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: List.generate(widget.messages.length, (index) {
+ // Adjusting state in render is ugly. But works.
+ // This is done because we need a global key but the paragraphs are added as you go.
+ if (_paragraphKeys.length <= index) {
+ _paragraphKeys.add(GlobalKey());
+ }
+
+ return Paragraph(
+ key: _paragraphKeys[index],
+ message: widget.messages[index],
+ highlightedText: searchText,
+ onSeek: widget.onSeek,
+ );
+
+ }),
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/project.dart b/lib/project.dart
index 32502d9b..4159014e 100644
--- a/lib/project.dart
+++ b/lib/project.dart
@@ -112,25 +112,30 @@ class Task {
}
}
-enum ProjectType { image, text, speech }
+enum ProjectType { image, text, textToImage, speech }
ProjectType parseProjectType(String name) {
if (name == "image") {
return ProjectType.image;
}
- if (name == "text"){
+ if (name == "text" || name == "text-generation"){
return ProjectType.text;
}
+ if (name == "textToImage"){
+ return ProjectType.textToImage;
+ }
if (name == "speech") {
return ProjectType.speech;
}
- throw UnimplementedError();
+ throw UnimplementedError(name);
}
String projectTypeToString(ProjectType type) {
switch(type){
case ProjectType.text:
return "text";
+ case ProjectType.textToImage:
+ return "textToImage";
case ProjectType.image:
return "image";
case ProjectType.speech:
diff --git a/lib/projects/projects_page.dart b/lib/projects/projects_page.dart
index 7c80609b..ac6daf5d 100644
--- a/lib/projects/projects_page.dart
+++ b/lib/projects/projects_page.dart
@@ -9,7 +9,6 @@ import 'package:inference/config.dart';
import 'package:inference/header.dart';
import 'package:inference/importers/importer.dart';
import 'package:inference/project.dart';
-import 'package:inference/projects/task_type_filter.dart';
import 'package:inference/providers/project_filter_provider.dart';
import 'package:inference/providers/project_provider.dart';
import 'package:inference/searchbar.dart';
diff --git a/lib/providers/download_provider.dart b/lib/providers/download_provider.dart
index 1a109c41..3da5b828 100644
--- a/lib/providers/download_provider.dart
+++ b/lib/providers/download_provider.dart
@@ -1,7 +1,4 @@
-import 'dart:io';
-
import 'package:dio/dio.dart';
-import 'package:dio/io.dart';
import 'package:flutter/foundation.dart';
import 'package:inference/deployment_processor.dart';
import 'package:inference/project.dart';
@@ -22,11 +19,11 @@ class DownloadStats {
}
class DownloadProvider extends ChangeNotifier {
- final Project? project;
final Map _downloads = {};
CancelToken? _cancelToken;
- DownloadProvider(this.project);
+ Function? onCancel;
+ DownloadProvider();
Future queue(Map downloads, String? token) async{
List promises = [];
@@ -39,7 +36,7 @@ class DownloadProvider extends ChangeNotifier {
_downloads[url] = state;
final destination = downloads[url];
Map headers = {};
- if (token != null) {
+ if (token != null && token.isNotEmpty) {
headers["Authorization"] = "Bearer $token";
}
final promise = dio.download(url, destination,
@@ -51,15 +48,16 @@ class DownloadProvider extends ChangeNotifier {
state.total = total;
notifyListeners();
}
- });
- promise.catchError((e) {
+ },
+ ).catchError((e) {
if (e is DioException && e.type == DioExceptionType.cancel) {
print("Download cancelled: $url");
+ return Response(requestOptions: RequestOptions(path: url));
} else {
_cancelToken?.cancel();
+ throw e;
}
- });
- promise.then((_) => state.done);
+ }).then((_) => state.done);
promises.add(promise);
}
@@ -92,7 +90,7 @@ class DownloadProvider extends ChangeNotifier {
void cancel() {
_cancelToken?.cancel();
- deleteProjectData(project!);
+ onCancel?.call();
}
@override
diff --git a/lib/providers/text_to_image_inference_provider.dart b/lib/providers/text_to_image_inference_provider.dart
new file mode 100644
index 00000000..adafab4c
--- /dev/null
+++ b/lib/providers/text_to_image_inference_provider.dart
@@ -0,0 +1,213 @@
+import 'dart:async';
+import 'dart:convert';
+import 'dart:typed_data';
+import 'dart:ui' as ui;
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart' show rootBundle;
+import 'package:inference/interop/generated_bindings.dart';
+import 'package:inference/interop/tti_inference.dart';
+import 'package:inference/project.dart';
+
+enum Speaker { assistant, user }
+
+class ImageContent {
+ final Uint8List imageData;
+ final int width;
+ final int height;
+ final BoxFit boxFit;
+ const ImageContent(this.imageData, this.width, this.height, this.boxFit);
+
+}
+
+class Message {
+ final Speaker speaker;
+ final String message;
+ final ImageContent? imageContent;
+ final TTIMetrics? metrics;
+ final bool allowedCopy; // Don't allow loading images to be copied
+
+ const Message(this.speaker, this.message, this.imageContent, this.metrics, this.allowedCopy);
+}
+
+class TextToImageInferenceProvider extends ChangeNotifier {
+ Completer loaded = Completer();
+
+ Project? _project;
+ String? _device;
+
+ Project? get project => _project;
+
+ String? get device => _device;
+
+ TTIMetrics? get metrics => _messages.lastOrNull?.metrics;
+
+ Uint8List? _imageBytes;
+
+ int _loadWidth = 512;
+ int _loadHeight = 512;
+
+ int _width = 512;
+
+ int get width => _width;
+
+ set width(int v) {
+ _width = v;
+ notifyListeners();
+ }
+
+ int _height = 512;
+
+ int get height => _height;
+
+ set height(int v) {
+ _height = v;
+ notifyListeners();
+ }
+
+ int _rounds = 20;
+
+ int get rounds => _rounds;
+
+ set rounds(int v) {
+ _rounds = v;
+ notifyListeners();
+ }
+
+ TTIInference? _inference;
+ final stopWatch = Stopwatch();
+ int n = 0;
+
+ TextToImageInferenceProvider(Project? project, String? device) {
+ _project = project;
+ _device = device;
+
+ if (project != null && device != null) {
+ preloadImageBytes();
+ print("instantiating project: ${project.name}");
+ print(project.storagePath);
+ print(device);
+ TTIInference.init(project.storagePath, device).then((instance) {
+ print("done loading");
+ _inference = instance;
+ loaded.complete();
+ notifyListeners();
+ });
+ }
+ }
+
+ void preloadImageBytes() {
+ rootBundle.load('images/intel-loading.gif').then((data) {
+ _imageBytes = data.buffer.asUint8List();
+ // Optionally notify listeners if you need to update UI
+ notifyListeners();
+ });
+ }
+
+
+ bool sameProps(Project? project, String? device) {
+ return _project == project && _device == device;
+ }
+
+ bool get initialized => loaded.isCompleted;
+ final List _messages = [];
+
+ double? _speed;
+
+ double? get speed => _speed;
+
+ set speed(double? speed) {
+ _speed = speed;
+ notifyListeners();
+ }
+
+ String? _response;
+
+ String? get response => _response;
+
+ set response(String? response) {
+ _response = response;
+ notifyListeners();
+ }
+
+ String get task {
+ return "Image Generation";
+ }
+
+ Message? get interimResponse {
+ if (_response == null) {
+ return null;
+ }
+ final imageContent = ImageContent(_imageBytes ?? Uint8List(0), _loadWidth, _loadHeight, BoxFit.contain);
+
+ return Message(Speaker.assistant, response!, imageContent, null, false);
+ }
+
+ List get messages {
+ if (interimResponse == null) {
+ return _messages;
+ }
+ return [..._messages, interimResponse!];
+ }
+
+ Future createImage(Uint8List bytes) async {
+ return await decodeImageFromList(bytes);
+ }
+
+ Future message(String message) async {
+ _response = "Generating image...";
+
+ _messages.add(Message(Speaker.user, message, null, null, false));
+ notifyListeners();
+
+ _loadWidth = width;
+ _loadHeight = height;
+ final response = await _inference!.prompt(message, width, height, rounds);
+
+ final imageData = base64Decode(response.content);
+ final imageContent = ImageContent(imageData, _loadWidth, _loadHeight, BoxFit.contain);
+
+ if (_messages.isNotEmpty) {
+ _messages.add(Message(Speaker.assistant, "Generated image", imageContent, response.metrics, true));
+ }
+ _response = null;
+
+ n = 0;
+ if (hasListeners) {
+ notifyListeners();
+ }
+ }
+
+ void close() {
+ _messages.clear();
+ _inference?.close();
+ _response = null;
+ if (_inference != null) {
+ _inference!.close();
+ }
+ }
+
+ void forceStop() {
+ // Todo
+ }
+
+ void reset() {
+ //_inference?.close();
+ // _inference?.forceStop();
+ // _inference?.clearHistory();
+ _messages.clear();
+ _response = null;
+ notifyListeners();
+ }
+
+ @override
+ void dispose() {
+ if (_inference != null) {
+ _inference?.close();
+ super.dispose();
+ } else {
+ close();
+ super.dispose();
+ }
+ }
+}
diff --git a/lib/public_models.dart b/lib/public_models.dart
index 0305bb62..0efd70fe 100644
--- a/lib/public_models.dart
+++ b/lib/public_models.dart
@@ -30,7 +30,7 @@ void writeProjectJson(PublicProject project) {
}
Future getAdditionalModelInfo(PublicProject project) async {
- final configJsonURL = huggingFaceModelFileUrl(project.id, "config.json");
+ final configJsonURL = huggingFaceModelFileUrl(project.modelId, "config.json");
final config = jsonDecode((await http.get(
Uri.parse(configJsonURL),
headers: {
@@ -47,9 +47,9 @@ Future> getFilesForModel(String modelId) async {
return List.from(result.data[0]["siblings"].map((m) => m.values.first));
}
-Future