diff --git a/docs/articles_en/about-openvino/performance-benchmarks.rst b/docs/articles_en/about-openvino/performance-benchmarks.rst index e0235e8350522c..52dcd849da4fb7 100644 --- a/docs/articles_en/about-openvino/performance-benchmarks.rst +++ b/docs/articles_en/about-openvino/performance-benchmarks.rst @@ -18,17 +18,16 @@ Performance Benchmarks This page presents benchmark results for the `Intel® Distribution of OpenVINO™ toolkit `__ -and :doc:`OpenVINO Model Server <../../model-server/ovms_what_is_openvino_model_server>`, for a representative -selection of public neural networks and Intel® devices. The results may help you decide which -hardware to use in your applications or plan AI workload for the hardware you have already -implemented in your solutions. Click the buttons below to see the chosen benchmark data. +and :doc:`OpenVINO Model Server <../../model-server/ovms_what_is_openvino_model_server>`, for +a representative selection of public neural networks and Intel® devices. The results may help +you decide which hardware to use in your applications or plan AI workload for the hardware +you have already implemented in your solutions. Click the buttons below to see the chosen +benchmark data. .. note:: - For the current release, benchmark data for the OpenVINO inference engine is available only on the + Benchmark data for the OpenVINO inference engine is available only on the `Model Hub page `__. - Clicking the button will take you there. In future releases, it will be posted here as well, - just like before. .. grid:: 1 1 2 2 @@ -159,7 +158,7 @@ For a listing of all platforms and configurations used for testing, refer to the **Disclaimers** * System configurations used for Intel® Distribution of OpenVINO™ toolkit performance results - are based on release 2025.1, as of April 9th, 2025. + are based on release 2025.2, as of June 18th, 2025. * OpenVINO Model Server performance results are based on release 2025.1, as of April 21, 2025. diff --git a/docs/articles_en/about-openvino/performance-benchmarks/model-accuracy-int8-fp32.rst b/docs/articles_en/about-openvino/performance-benchmarks/model-accuracy-int8-fp32.rst index 293d824846c505..e2dbe2189f8fa3 100644 --- a/docs/articles_en/about-openvino/performance-benchmarks/model-accuracy-int8-fp32.rst +++ b/docs/articles_en/about-openvino/performance-benchmarks/model-accuracy-int8-fp32.rst @@ -29,7 +29,7 @@ the table for more information. - spearman@cosine - 2.57% - 2.65% - - 2.54% + - 2.95% - 2.89% * - Detectron-V2 - COCO2017_detection_91cl_bkgr @@ -41,10 +41,10 @@ the table for more information. * - mobilenet-v2 - ImageNet2012 - accuracy @ top1 - - -0.93% - -0.91% + - -0.93% + - -1.03% - -1.03% - - -0.95% * - resnet-50 - ImageNet2012 - accuracy @ top1 @@ -95,7 +95,7 @@ the table for more information. - accuracy @ top1 - 0.00% - 0.00% - - 0.00% + - 0.02% - 0.01% * - resnet-50 - ImageNet2012 @@ -114,9 +114,9 @@ the table for more information. * - yolo_v11 - COCO2017_detection_80cl - map - - -2.70% - - - - + - -0.03% + - -2.21% + - -2.21% - .. list-table:: Model Accuracy for AMX-FP16, AMX-INT4, Arc-FP16 and Arc-INT4 (Arc™ B-series) :header-rows: 1 @@ -131,101 +131,80 @@ the table for more information. * - DeepSeek-R1-Distill-Llama-8B - Data Default WWB - Similarity - - 9.71% - - 21.25% + - 23.8% + - 27.3% - - - 21.04% + - 23.06% * - DeepSeek-R1-Distill-Qwen-1.5B - Data Default WWB - Similarity - - 8.45% - - 34.5% - - 22.10% - - 32.02% - * - DeepSeek-R1-Distill-Qwen-7B - - Data Default WWB - - Similarity - - 25.5% - - 35.6% - - 3.9% - - 37.2% + - 33.42% + - 38.7% + - 33.3% + - 39.8% * - Gemma-2-9B-it - Data Default WWB - Similarity - - 0.89% - - 3.99% + - 1.41% + - 3.5% - % - - 4.04% + - 3.38% * - GLM4-9B-Chat - Data Default WWB - Similarity - - 2.52% - - 8.48% - - 8.38% + - 1.2% + - 6.68% + - 5.47% - - * - Qwen-2.5-7B-instruct + * - Qwen-2.5-1.5B-instruct - Data Default WWB - Similarity - - 1.51% - - 8.3% - - - - 8.237% - * - Llama-2-7b-chat - - Data Default WWB - - Similarity - - 1.43% - - 7.46% - - - - 7.18% + - 5.07% + - 11.24% + - 0.3 + - 12.77% * - Llama-3.2-3b-instruct - Data Default WWB - Similarity - - 2.75% - - 12.05% - - 0.52% - - 11.95% + - 2.35% + - 5.99% + - 1.3% + - 5.84% * - Mistral-7b-instruct-V0.3 - Data Default WWB - Similarity - - 2.46% - - 8.93% - - 3.17% - - 7.90% - * - Phi3-mini-4k-instruct - - Data Default WWB - - Similarity - - 4.55% - - 7.23% - - 1.39% - - 8.47% + - 1.71% + - 7.24% + - 0.07% + - 6.49% * - Phi4-mini-instruct - Data Default WWB - Similarity - - 6.59% - - 12.17% - - 1.91% - - 12.03% + - 3.63% + - 7.46% + - 0.69% + - 8.15% * - Qwen2-VL-7B - Data Default WWB - Similarity - - 1.29% - - 8.71% - - 4.22% - - 9.43% + - 6.12% + - 7.89% + - 4.09% + - 8.52% * - Flux.1-schnell - Data Default WWB - Similarity - - 4.80% - - 3.80% + - 4.67% + - 3.85% - - - 2.80% + - 3.45% * - Stable-Diffusion-V1-5 - Data Default WWB - Similarity - - 3.00% - - 4.30% + - 3.29% + - 4.91% - 0.50% - - 4.40% + - 9.16% Notes: For all accuracy metrics a "-", (minus sign), indicates an accuracy drop. The Similarity metric is the distance from "perfect" and as such always positive. diff --git a/docs/articles_en/about-openvino/performance-benchmarks/performance-benchmarks-faq.rst b/docs/articles_en/about-openvino/performance-benchmarks/performance-benchmarks-faq.rst index 85e4d675ff272a..430067964b8eb5 100644 --- a/docs/articles_en/about-openvino/performance-benchmarks/performance-benchmarks-faq.rst +++ b/docs/articles_en/about-openvino/performance-benchmarks/performance-benchmarks-faq.rst @@ -87,10 +87,14 @@ Performance Information F.A.Q. - Huggingface - Auto regressive language - 128K - * - `Qwen-2.5-7B-Instruct `__ + * - `Qwen-2.5-VL-3B-Instruct `__ - Huggingface - Auto regressive language - - 128K + - 32K + * - `Qwen-2.5-1.5B-Instruct `__ + - Huggingface + - Auto regressive language + - 32K * - `Stable-Diffusion-V1-5 `__ - Hugginface - Latent Diffusion Model diff --git a/docs/articles_en/about-openvino/release-notes-openvino.rst b/docs/articles_en/about-openvino/release-notes-openvino.rst index 7def4c86594f28..24d032be7090e0 100644 --- a/docs/articles_en/about-openvino/release-notes-openvino.rst +++ b/docs/articles_en/about-openvino/release-notes-openvino.rst @@ -16,327 +16,317 @@ OpenVINO Release Notes -2025.1 - 09 April 2025 -############################# +2025.2 - 18 June 2025 +############################################################################################# :doc:`System Requirements <./release-notes-openvino/system-requirements>` | :doc:`Release policy <./release-notes-openvino/release-policy>` | :doc:`Installation Guides <./../get-started/install-openvino>` - What's new -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * More Gen AI coverage and frameworks integrations to minimize code changes - * New models supported: Phi-4 Mini, Jina CLIP v1, and Bce Embedding Base v1. - * OpenVINO™ Model Server now supports VLM models, including Qwen2-VL, Phi-3.5-Vision, - and InternVL2. - * OpenVINO GenAI now includes image-to-image and inpainting features for transformer-based - pipelines, such as Flux.1 and Stable Diffusion 3 models, enhancing their ability to - generate more realistic content. - * Preview: `AI Playground `__ - now utilizes the OpenVINO Gen AI backend to enable highly optimized inferencing - performance on AI PCs. + * New models supported on CPUs & GPUs: Phi-4, Mistral-7B-Instruct-v0.3, SD-XL Inpainting 0.1, + Stable Diffusion 3.5 Large Turbo, Phi-4-reasoning, Qwen3, and Qwen2.5-VL-3B-Instruct. Mistral + 7B Instruct v0.3 is also supported on NPUs.​ + * Preview: OpenVINO ™ GenAI introduces a text-to-speech pipeline for the SpeechT5 TTS model, + while the new RAG backend offers developers a simplified API that delivers reduced memory usage + and improved performance.​ + * Preview: OpenVINO™ GenAI offers a GGUF Reader for seamless integration of llama.cpp based LLMs, + with Python and C++ pipelines that load GGUF models, build OpenVINO graphs, and run GPU inference + on-the-fly. Validated for popular models: DeepSeek-R1-Distill-Qwen (1.5B, 7B), Qwen2.5 Instruct + (1.5B, 3B, 7B) & llama-3.2 Instruct (1B, 3B, 8B). * Broader LLM model support and more model compression techniques - * Reduced binary size through optimization of the CPU plugin and removal of the GEMM kernel. - * Optimization of new kernels for the GPU plugin significantly boosts the performance of - Long Short-Term Memory (LSTM) models, used in many applications, including speech - recognition, language modeling, and time series forecasting. - * Preview: Token Eviction implemented in OpenVINO GenAI to reduce the memory consumption - of KV Cache by eliminating unimportant tokens. This current Token Eviction implementation - is beneficial for tasks where a long sequence is generated, such as chatbots and code - generation. - * NPU acceleration for text generation is now enabled in OpenVINO™ Runtime and - OpenVINO™ Model Server to support the power-efficient deployment of VLM models on NPUs - for AI PC use cases with low concurrency. + * Further optimization of LoRA adapters in OpenVINO GenAI for improved LLM, VLM, and text-to-image + model performance on built-in GPUs. Developers can use LoRA adapters to quickly customize models + for specialized tasks. ​ + * KV cache compression for CPUs is enabled by default for INT8, providing a reduced memory footprint + while maintaining accuracy compared to FP16. Additionally, it delivers substantial memory savings + for LLMs with INT4 support compared to INT8.​ + * Optimizations for Intel® Core™ Ultra Processor Series 2 built-in GPUs and Intel® Arc™ B Series + Graphics with the Intel® XMX systolic platform to enhance the performance of VLM models and hybrid + quantized image generation models, as well as improve first-token latency for LLMs through dynamic + quantization. * More portability and performance to run AI at the edge, in the cloud or locally - * Support for the latest Intel® Core™ processors (Series 2, formerly codenamed Bartlett Lake), - Intel® Core™ 3 Processor N-series and Intel® Processor N-series - (formerly codenamed Twin Lake) on Windows. - * Additional LLM performance optimizations on Intel® Core™ Ultra 200H series processors - for improved 2nd token latency on Windows and Linux. - * Enhanced performance and efficient resource utilization with the implementation of - Paged Attention and Continuous Batching by default in the GPU plugin. - * Preview: The new OpenVINO backend for Executorch will enable accelerated inference and - improved performance on Intel hardware, including CPUs, GPUs, and NPUs. - - - -OpenVINO™ Runtime -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -Common ------------------------------------------------------------------------------------------------ - -* Delayed weight compression is now available - compressed weights are not stored in memory - but saved to a file immediately after compression to control memory consumption. -* Register extensions per frontend (update for extension API) -* mmaped tensors havve been added, to read ov::Tensor from file on disk using mmap and - help reduce memory consumption in some scenarios, for example, when using LoRa adapters - in GenAI. - + * Enhanced Linux* support with the latest GPU driver for built-in GPUs on Intel® Core™ Ultra Processor + Series 2 (formerly codenamed Arrow Lake H). ​ + * OpenVINO™ Model Server now offers a streamlined C++ version for Windows and enables improved performance + for long-context models through prefix caching, and a smaller Windows package that eliminates the Python + dependency. Support for Hugging Face models is now included.​ + * Support for INT4 data-free weights compression for ONNX models implemented in the Neural Network + Compression Framework (NNCF)​. + * NPU support for FP16-NF4 precision on Intel® Core™ 200V Series processors for models with up to 8B + parameters is enabled through symmetrical and channel-wise quantization, improving accuracy while + maintaining performance efficiency. + + +OpenVINO™ Runtime ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Common +--------------------------------------------------------------------------------------------- + +* Better developer experience with shorter build times, due to optimizations and source code + refactoring. Code readability has been improved, helping developers understand the + components included between different C++ files. +* Memory consumption has been optimized by expanding the usage of mmap for the GenAI + component and introducing the delayed constant weights mechanism. +* Support for ISTFT operator for GPU has been expanded, improving support of text-to-speech, + speech-to-text, and speech-to-speech models, like AudioShake and Kokoro. +* Models like Behavior Sequence Transformer are now supported, thanks to SparseFillEmptyRows + and SegmentMax operators. +* google/fnet-base, tf/InstaNet, and more models are now enabled, thanks to DFT operators + (discrete Fourier transform) supporting dynamism. +* "COMPILED_BLOB" hint property is now available to speed up model compilation. + The "COMPILED_BLOB" can be a regular or weightless model. For weightless models, + the "WEIGHT_PATH" hint provides location of the model weights. +* Reading tensor data from file as copy or using mmap feature is now available. + + +AUTO Inference Mode +--------------------------------------------------------------------------------------------- + +* Memory footprint in model caching has been reduced by loading the model only for the selected + plugin, avoiding duplicate model objects. CPU Device Plugin ------------------------------------------------------------------------------------------------ - -* Dynamic quantization of Fully Connected layers with asymmetric weights is now enabled on - Intel AVX2 platforms, improving out-of-the-box performance for 8bit/4bit asymmetric - weight-compressed LLMs. -* Performance of weight compressed LLMs for long prompts has been optimized on Intel client - and Xeon platforms, especially on 1st token latency. -* Optimization of QKV (Query, Key, and Value) projection and MLP (Multilayer Perceptrons) - fusion for LLMs has been extended to support BF16 on Windows OS for performance - improvements on AMX platforms. -* GEMM kernel has been removed from the OpenVINO CPU library, reducing its size. -* FP8 (alias for f8e4m3 and f8e5m2) model support has been enhanced with optimized FakeConvert - operator. Compilation time for FP8 LLMs has also been improved. +--------------------------------------------------------------------------------------------- + +* Per-channel INT8 KV cache compression is now enabled by default, helping LLMs + maintain accuracy while reducing memory consumption. +* Per-channel INT4 KV cache compression is supported and can be enabled using the properties + `KEY_CACHE_PRECISION` and `KEY_CACHE_QUANT_MODE`. + Some models may be sensitive to INT4 KV cache compression. +* Performance of encoder-based LLMs has been improved through additional graph-level optimizations, + including QKV (Query, Key, and Value) projection and Multi-Head Attention (MHA). +* SnapKV support has been implemented in the CPU plugin to reduce KV cache size while + maintaining comparable performance. It calculates attention scores in PagedAttention + for both prefill and decode stages. This feature is enabled by default in OpenVINO GenAI when + KV cache eviction is used. GPU Device Plugin ------------------------------------------------------------------------------------------------ - -* Second token latency of large language models has been improved on all GPU platforms - with optimization of translation lookaside buffer (TLB) scenario and - Group Query Attention (GQA). -* First token latency of large language models has been improved on - Intel Core Ultra Processors Series 2 with Paged Attention optimization. -* Int8 compressed KV-cache is enabled for LLMs by default on all GPU platforms. -* Performance of VLM (visual language models) has been improved on GPU platforms - with XMX (Xe Matrix eXtensions). +--------------------------------------------------------------------------------------------- + +* Performance of generative models (e.g. large language models, visual language models, image + generation models) has been improved on XMX-based platforms (Intel® Core™ Ultra Processor + Series 2 built-in GPUs and Intel® Arc™ B Series Graphics) with dynamic quantization and + optimization in GEMM and Convolution. +* 2nd token latency of INT4 generative models has been improved on Intel® Core™ Processors, + Series 1. +* LoRa support has been optimized for Intel® Core™ Processor GPUs and its memory footprint + improved, by optimizing the OPS nodes dependency. +* SnapKV cache rotation now supports accurate token eviction through re-rotation of cache + segments that change position after token eviction. +* KV cache compression is now available for systolic platforms with an update to micro kernel + implementation. +* Improvements to Paged Attention performance and functionality have been made, with support + of different head sizes for Key and Value in KV-Cache inputs. NPU Device Plugin ------------------------------------------------------------------------------------------------ +--------------------------------------------------------------------------------------------- + +* The NPU Plugin can now retrieve options from the compiler and mark only the corresponding + OpenVINO properties as supported. +* The model import path now supports passing precompiled models directly to the plugin using the + `ov::compiled_blob` property (Tensor), removing the need for stream access. +* The `ov::intel_npu::turbo` property is now forwarded both to the compiler and the driver + when supported. Using NPU_TURBO may result in longer compile time, increased memory footprint, + changes in workload latency, and compatibility issues with older NPU drivers. +* The same Level Zero context is now used across OpenVINO Cores, enabling remote tensors created + through one Core object to be used with inference requests created with another Core object. +* BlobContainer has been replaced with regular OpenVINO tensors, simplifying the underlying container + for a compiled blob. +* Weightless caching and compilation for LLMs are now available when used with OpenVINO GenAI. +* LLM accuracy issues with BF16 models have been resolved. +* The NPU driver is now included in OpenVINO Docker images for Ubuntu, enabling out-of-the-box NPU + support without manual driver installation. For instructions, refer to the + `OpenVINO Docker documentation `__. +* NPU support for FP16-NF4 precision on Intel® Core™ 200V Series processors for models with up to 8B parameters is + enabled through symmetrical and channel-wise quantization, improving accuracy while maintaining performance + efficiency. FP16-NF4 is not supported on CPUs and GPUs. -* Support for LLM weightless caching and encryption of LLM blobs. -* When a model is imported from cache, you can now use ``ov::internal::cached_model_buffer`` - to reduce memory footprint. -* NF4 (4-bit NormalFloat) inputs/outputs are now supported. E2E support depends on the - driver version. -* The following issues have been fixed: - - * for stateful models: update level zero command list when tensor is relocated. - * for zeContextDestroy error that occurred when applications were using static ov::Cores. OpenVINO Python API ------------------------------------------------------------------------------------------------ +--------------------------------------------------------------------------------------------- + +* Wheel package and source code now include type hinting support (.pyi files), to help + Python developers work in IDE. By default, pyi files will be generated automatically but + can be triggered manually by developers themselves. +* The `compiled_blob` property has been added to improve work with compiled blobs for NPU. + +OpenVINO C API +--------------------------------------------------------------------------------------------- -* Ability to create a Tensor directly from a Pillow image, eliminating the need for - casting it to a NumPy array first. -* Optimization of memory consumption for export_model, read_model, and compile_model methods. +* A new API function is now available, to read IR models directly from memory. OpenVINO Node.js API ------------------------------------------------------------------------------------------------ +--------------------------------------------------------------------------------------------- -* Node.js bindings for OpenVINO GenAI are now available in the genai-node npm package - and bring the simplicity of OpenVINO GenAI API to Node.js applications. +* OpenVINO GenAI has been expanded for JS package API compliance, to address future LangChain.js + user requirements (defined by the LangChain adapter definition). +* A new sample has been added, demonstrating OpenVINO GenAI in JS. -PyTorch Framework Support ------------------------------------------------------------------------------------------------ +PyTorch Framework Support +--------------------------------------------------------------------------------------------- +* Complex numbers in the RoPE pattern, used in Wan2.1 model, are now supported. -* PyTorch version 2.6 is now supported. -* Common translators have been implemented to unify decompositions for operations of multiple - frameworks (PyTorch, TensorFlow, ONNX, JAX) and to support complex tensors. -* FP8 model conversion is now supported. -* Conversion of TTS models containing STFT/ISTFT operators has been enabled. -JAX Framework Support ------------------------------------------------------------------------------------------------ +OpenVINO™ Model Server ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -* JAX 0.5.2 and Flax 0.10.4 have been added to validation. +* Major new features: -Keras 3 Multi-backend Framework Support ------------------------------------------------------------------------------------------------ + * Image generation endpoint - this preview feature enables image generation based on text + prompts. The endpoint is compatible with OpenAI API making it easy to integrate with the + existing ecosystem. + * Agentic AI enablement via support for tools in LLM models. This preview feature allows + easy integration of OpenVINO serving with AI Agents. + * Model management via OVMS CLI now includes automatic download of OpenVINO models from + Hugging Face Hub. This makes it possible to deploy generative pipelines with just a + single command and manage the models without extra scripts or manual steps. -* Keras 3.9.0 is now supported. -* Provided more granular test exclusion mechanism for convenient enabling per operation. +* Other improvements: + * VLM models with chat/completion endpoint can now support passing the images as URL or as + path to a local file system. + * Option to use C++ only server version with support for LLM models. This smaller deployment + package can be used both for completion and chat/completions. -TensorFlow Lite Framework Support ------------------------------------------------------------------------------------------------ +* The following issues have been fixed: -* Enabled support for models which use quantized tensors between layers in runtime. + * Correct error status now reported in streaming mode. -OpenVINO Model Server -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +* Known limitations: -* Major new features: + * VLM models QuenVL2, QwenVL2.5 and Phi3_VL have low accuracy when deployed in a text + generation pipeline with continuous batching. It is recommended to deploy these models + in a stateful pipeline which processes the requests serially. - * VLM support with continuous batching - the endpoint `chat/completion` has been extended - to support vision models. Now it is possible to send images in the context of chat. - Vision models can be deployed like the LLM models. - * NPU acceleration for text generation - now it is possible to deploy LLM and VLM models - on NPU accelerator. Text generation will be exposed over completions and chat/completions - endpoints. From the client perspective it works the same way as in GPU and CPU deployment, - however it doesn't use the continuous batching algorithm, and target is AI PC use cases - with low concurrency. - -* Other improvements - - * Model management improvements - mediapipe graphs and generative endpoints can be now - started just using command line parameters without the configuration file. Configuration - file Json structure for models and graphs has been unified under the - `models_config_list` section. - * Updated scalability demonstration using multiple instances, see - `the demo `__. - * Increased allowed number of stop words in a request from 4 to 16. - * Integration with the Visual Studio Code extension of Continue has been enabled making - it possible to use the assistance of local AI service while writing code. - * Performance improvements - enhancements in OpenVINO Runtime and also text sampling - generation algorithm which should increase the throughput in high concurrency load - scenarios. - -* Breaking changes - - * gRPC server is now optional. There is no default gRPC port set. The ``--port`` parameter - is mandatory to start the gRPC server. It is possible to start REST API server only with - the ``--rest_port`` parameter. At least one port number needs to be defined to start - OVMS server from CLI (--port or --rest_port). Starting OVMS server via C API calls does - not require any port to be defined. -* The following issues have been fixed: +Neural Network Compression Framework ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +* Data-free AWQ (Activation-aware Weight Quantization) method for 4-bit weight compression, + nncf.compress_weights(), is now available for OpenVINO models. Now it is possible to + compress weights to 4-bit with AWQ even without the dataset. +* 8-bit and 4-bit data-free weight compression, nncf.compress_weights(), is now available + for models in ONNX format. + `See example `__. +* 4-bit data-aware AWQ (Activation-aware Weight Quantization) and Scale Estimation methods + are now available for models in the TorchFX format. +* TorchFunctionMode-based model tracing is now enabled by default for PyTorch models in + nncf.quantize() and nncf.compress_weights(). +* Neural Low-Rank Adapter Search (NLS) Quantization-Aware Training (QAT) for more + accurate 4-bit compression of LLMs on downstream tasks is now available. + `See example `__. +* Weight compression time for NF4 data type has been reduced. - * Handling of the LLM context length - OVMS will now stop generating the text when model - context is exceeded. An error will be raised when the prompt is longer from the context - or when the max_tokens plus the input tokens exceeds the model context. - In addition, it is possible to constrain the max number of generated tokens for all - users of the model. - * Security and stability improvements. - * Cancellation of LLM generation without streaming. -* Known limitations +OpenVINO Tokenizers ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - * `Chat/completions` accepts images encoded to base64 format but not as URL links. +* Regex-based normalization and split operations have been optimized, resulting in significant + speed improvements, especially for long input strings. +* Two-string inputs are now supported, enabling various tasks, including RAG reranking. +* Sentencepiece char-level tokenizers are now supported to enhance the SpeechT5 TTS model. +* The tokenization node factory has been exposed to enable OpenVINO GenAI GGUF support. -Neural Network Compression Framework -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +OpenVINO GenAI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -* Preview support for the Quantization-Aware Training (QAT) with LoRA adapters for more - accurate 4-bit weight compression of LLMs in PyTorch. The ``nncf.compress_weight`` API has - been extended by a new ``compression_format`` option: ``CompressionFormat.FQ_LORA``, for this - QAT method. To see how it works, see - `the sample `__. -* Added Activation-aware Weight Quantization and Scale Estimation data-aware 4-bit compression - methods for PyTorch backend. Now the compression of LLMs can directly be applied to PyTorch - models to speed up the process. -* Reduced Generative Pre-trained Transformers Quantization (GPTQ) compression time and peak - memory usage. -* Reduced compression time and peak memory usage of data-free mixed precision weight - compression. -* New tracing for PyTorch models based on TorchFunctionMode for ``nncf.quantize`` and - ``nncf.compress_weights``, which does not require torch namespace fixes. - Disabled by default, it can be enabled by the environment variable ``"NNCF_EXPERIMENTAL_TORCH_TRACING=1”``. -* Multiple improvements in TorchFX backend to comply with the Torch AO guidelines: - - * The constant folding pass is removed from the OpenVINO Quantizer and the ``quantize_pt2e`` - function. - * Support for dynamic shape TorchFX models. - -* Initial steps to adopt custom quantizers in quantize_pt2e within NNCF: - - * The hardware configuration is generalized with the narrow_range parameter. - * The quantizer parameter calculation code is refactored to explicitly depend on narrow_range. - -* Preview support of the OpenVINO backend in `ExecuTorch `__ - has been introduced, model quantization is implemented via the function: - `nncf.experimental.torch.fx.quantize_pt2e `__. -* PyTorch version 2.6 is now supported. +* New preview pipelines with C++ and Python samples have been added: + * Text2SpeechPipeline, + * TextEmbeddingPipeline covering RAG scenario. -OpenVINO Tokenizers -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +* Visual language modeling (VLMPipeline): -* Support for Unigram tokenization models. -* Build OpenVINO Tokenizers with installed ICU (International Components for Unicode) - plugin for reduced binary size. -* max_length and padding rule parameters can be dynamically adjusted with Tokenizer class - from OpenVINO GenAI. -* Remove fast_tokenizer dependency, no core_tokenizers binary in the OpenVINO Tokenizers - distribution anymore. + * VLM prompt can now refer to specific images. For example, + ``What’s in the image?`` will prepend the corresponding image to the prompt + while ignoring other images. See VLMPipeline’s docstrings for more details. + * VLM uses continuous batching by default, improving performance. + * VLMPipeline can now be constructed from in-memory `ov::Model`. + * Qwen2.5-VL support has been added. -OpenVINO.GenAI -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +* JavaScript: + * JavaScript samples have been added: beam_search_causal_lm and multinomial_causal_lm. + * An interruption option for LLMPipeline streaming has been introduced. + * The following has been added: - * Preview support for the Token Eviction mechanism for more efficient KVCache memory - management of LLMs during text generation. Disabled by default. - `See the sample `__. - * LLMPipeline C bindings and JavaScript bindings. - * StreamerBase::write(int64_t token) and - StreamerBase::write(const std::vector& tokens). - * Phi-3-vision-128k-instruct and Phi-3.5-vision-instruct support for VLMPipeline. - * Added Image2image and inpainting pipelines that support FLUX and Stable-Diffusion-3. - -* LLMPipeline now uses Paged Attention backend by default. -* Streaming is now performed in a separate thread while the next token is being inferred by LLM. -* Chat template is applied even with disabled chat mode. Use the ``apply_chat_template`` flag - to disable chat template in GenerationConfig. -* Time consuming methods now release Global Interpreter Lock (GIL). + * cache encryption samples demonstrating how to encode OpenVINO’s cached compiled model, + * LLM ReAct Agent sample capable of calling external functions during text generation, + * SD3 LoRA Adapter support for Text2ImagePipeline, + * `ov::genai::Tokenizer::get_vocab()` method for C++ and Python, + * `ov::Property` as arguments to the `ov_genai_llm_pipeline_create` function for the C API, + * support for the SnapKV method for more accurate KV cache eviction, enabled by default when + KV cache eviction is used, + * preview support for `GGUF models (GGML Unified Format) `__. + See the `OpenVINO blog `__ for details. + Other Changes and Known Issues +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -* **Windows PDB Archives**: - Archives containing PDB files for Windows packages are now available. - You can find them right next to the regular archives, in the same folder. + Jupyter Notebooks ----------------------------- -* `Qwen2.5VL `__ -* `Phi4-multimodal `__ -* `Gemma3 `__ -* `SigLIP2 `__ -* `YOLO v12 `__ -* `DeepSeek-VL2 `__ -* `LLasa `__ -* `GLM4-V `__ -* `GOT-OCR 2.0 `__ -* `OmniParser V2 `__ -* `Keras3 with OpenVINO backend `__ - +* `Wan2.1 text to video `__ +* `Flex2 `__ +* `DarkIR `__ +* `OpenVoice2 and MeloTTS `__ +* `InternVideo2 text to video retrieval `__ +* `Kokoro `__ +* `Qwen2.5-Omni `__ +* `InternVL3 `__ Known Issues ----------------------------- -| **Component: NPU** -| ID: n/a +| **Component: GPU** +| ID: 168284 | Description: -| For LLM runs with prompts longer than the user may set through the MAX_PROMPT_LEN parameter, - an exception occurs, with a note providing the reason. In the current version of OpenVINO, - the message is not correct. in future releases, the explanation will be fixed. +| Using the phi-3 or phi-3.5 model for speculative decoding with large input sequences on GPU + may cause an `OpenCL out of resources` error. -| **Component: NPU** -| ID: 164469 +| **Component: GPU** +| ID: 168637 | Description: -| With the NPU Linux driver release v1.13.0, a new behavior for NPU recovery in kernel - has been introduced. Corresponding changes in Ubuntu kernels are pending, targeting - new kernel releases. -| Workaround: -| If inference on NPU crashes, a manual reload of the driver is a recommended option - (``sudo rmmod intel_vpu`` ``sudo modprobe intel_vpu``. - A rollback to an earlier version of Linux NPU driver will also work. +| Quantizing the Qwen3-8b model to int4 using the AWQ method results in accuracy issues on GPU. | **Component: GPU** -| ID: 164331 +| ID: 168889 | Description: -| Qwen2-VL model crashes on some Intel platforms when large inputs are used. -| Workaround: -| Build OpenVINO GenAI from source. +| Running multiple `benchmark_app` processes simultaneously on Intel® Flex 170 or Intel® Arc™ A770 + may lead to a system crash. This is due to a device driver issue but appears when using + `benchmark_app`. | **Component: OpenVINO GenAI** -| ID: 165686 +| ID: 167065, 168564, 168360, 168339, 168361 | Description: -| In the VLM ContinuousBatching pipeline, when multiple requests are processed - using ``add_request()`` and ``step()`` API in multiple threads, the resulting - text is not correct. -| Workaround: -| Build OpenVINO GenAI from source. - +| Models such as Qwen-7B-Chat, Phi4-Reasoning, Llama-3.2-1B-Instruct, Qwen3-8B, and DeepSeek-R1-Distill-* + show reduced accuracy in chat scenarios compared to regular generation requests. Currently + no workaround is available; a fix is planned for future releases. +| **Component: OpenVINO GenAI** +| ID: 168957 +| Description: +| The stable-diffusion-v1-5 model in FP16 precision shows up to a 10% degradation in the 2nd token + latency on Intel® Xeon® Platinum 8580. Currently no workaround is available; + a fix is planned for future releases. +| **Component: ARM** +| ID: 166178 +| Description: +| Performance regression of models on ARM due to an upgrade to the latest ACL. A corresponding issue has + been created in the ACL and oneDNN repositories. .. Previous 2025 releases @@ -345,6 +335,260 @@ Known Issues .. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. dropdown:: 2025.1 - 09 April 2025 + :animate: fade-in-slide-down + :color: secondary + + **OpenVINO™ Runtime** + + *Common* + + * Delayed weight compression is now available - compressed weights are not stored in memory + but saved to a file immediately after compression to control memory consumption. + * Register extensions per frontend (update for extension API) + * mmaped tensors havve been added, to read ov::Tensor from file on disk using mmap and + help reduce memory consumption in some scenarios, for example, when using LoRa adapters + in GenAI. + + *CPU Device Plugin* + + * Dynamic quantization of Fully Connected layers with asymmetric weights is now enabled on + Intel AVX2 platforms, improving out-of-the-box performance for 8bit/4bit asymmetric + weight-compressed LLMs. + * Performance of weight compressed LLMs for long prompts has been optimized on Intel client + and Xeon platforms, especially on 1st token latency. + * Optimization of QKV (Query, Key, and Value) projection and MLP (Multilayer Perceptrons) + fusion for LLMs has been extended to support BF16 on Windows OS for performance + improvements on AMX platforms. + * GEMM kernel has been removed from the OpenVINO CPU library, reducing its size. + * FP8 (alias for f8e4m3 and f8e5m2) model support has been enhanced with optimized FakeConvert + operator. Compilation time for FP8 LLMs has also been improved. + + *GPU Device Plugin* + + * Second token latency of large language models has been improved on all GPU platforms + with optimization of translation lookaside buffer (TLB) scenario and + Group Query Attention (GQA). + * First token latency of large language models has been improved on + Intel Core Ultra Processors Series 2 with Paged Attention optimization. + * Int8 compressed KV-cache is enabled for LLMs by default on all GPU platforms. + * Performance of VLM (visual language models) has been improved on GPU platforms + with XMX (Xe Matrix eXtensions). + + *NPU Device Plugin* + + * Support for LLM weightless caching and encryption of LLM blobs. + * When a model is imported from cache, you can now use ``ov::internal::cached_model_buffer`` + to reduce memory footprint. + * NF4 (4-bit NormalFloat) inputs/outputs are now supported. E2E support depends on the + driver version. + * The following issues have been fixed: + + * for stateful models: update level zero command list when tensor is relocated. + * for zeContextDestroy error that occurred when applications were using static ov::Cores. + + *OpenVINO Python API* + + * Ability to create a Tensor directly from a Pillow image, eliminating the need for + casting it to a NumPy array first. + * Optimization of memory consumption for export_model, read_model, and compile_model methods. + + *OpenVINO Node.js API* + + * Node.js bindings for OpenVINO GenAI are now available in the genai-node npm package + and bring the simplicity of OpenVINO GenAI API to Node.js applications. + + *PyTorch Framework Support* + + * PyTorch version 2.6 is now supported. + * Common translators have been implemented to unify decompositions for operations of multiple + frameworks (PyTorch, TensorFlow, ONNX, JAX) and to support complex tensors. + * FP8 model conversion is now supported. + * Conversion of TTS models containing STFT/ISTFT operators has been enabled. + + *JAX Framework Support* + + * JAX 0.5.2 and Flax 0.10.4 have been added to validation. + + *Keras 3 Multi-backend Framework Support* + + * Keras 3.9.0 is now supported. + * Provided more granular test exclusion mechanism for convenient enabling per operation. + + *TensorFlow Lite Framework Support* + + * Enabled support for models which use quantized tensors between layers in runtime. + + **OpenVINO Model Server** + + * Major new features: + + * VLM support with continuous batching - the endpoint `chat/completion` has been extended + to support vision models. Now it is possible to send images in the context of chat. + Vision models can be deployed like the LLM models. + * NPU acceleration for text generation - now it is possible to deploy LLM and VLM models + on NPU accelerator. Text generation will be exposed over completions and chat/completions + endpoints. From the client perspective it works the same way as in GPU and CPU deployment, + however it doesn't use the continuous batching algorithm, and target is AI PC use cases + with low concurrency. + + * Other improvements + + * Model management improvements - mediapipe graphs and generative endpoints can be now + started just using command line parameters without the configuration file. Configuration + file Json structure for models and graphs has been unified under the + `models_config_list` section. + * Updated scalability demonstration using multiple instances, see + `the demo `__. + * Increased allowed number of stop words in a request from 4 to 16. + * Integration with the Visual Studio Code extension of Continue has been enabled making + it possible to use the assistance of local AI service while writing code. + * Performance improvements - enhancements in OpenVINO Runtime and also text sampling + generation algorithm which should increase the throughput in high concurrency load + scenarios. + + * Breaking changes + + * gRPC server is now optional. There is no default gRPC port set. The ``--port`` parameter + is mandatory to start the gRPC server. It is possible to start REST API server only with + the ``--rest_port`` parameter. At least one port number needs to be defined to start + OVMS server from CLI (--port or --rest_port). Starting OVMS server via C API calls does + not require any port to be defined. + + * The following issues have been fixed: + + * Handling of the LLM context length - OVMS will now stop generating the text when model + context is exceeded. An error will be raised when the prompt is longer from the context + or when the max_tokens plus the input tokens exceeds the model context. + In addition, it is possible to constrain the max number of generated tokens for all + users of the model. + * Security and stability improvements. + * Cancellation of LLM generation without streaming. + + * Known limitations + + * `Chat/completions` accepts images encoded to base64 format but not as URL links. + + **Neural Network Compression Framework** + + * Preview support for the Quantization-Aware Training (QAT) with LoRA adapters for more + accurate 4-bit weight compression of LLMs in PyTorch. The ``nncf.compress_weight`` API has + been extended by a new ``compression_format`` option: ``CompressionFormat.FQ_LORA``, for this + QAT method. To see how it works, see + `the sample `__. + * Added Activation-aware Weight Quantization and Scale Estimation data-aware 4-bit compression + methods for PyTorch backend. Now the compression of LLMs can directly be applied to PyTorch + models to speed up the process. + * Reduced Generative Pre-trained Transformers Quantization (GPTQ) compression time and peak + memory usage. + * Reduced compression time and peak memory usage of data-free mixed precision weight + compression. + * New tracing for PyTorch models based on TorchFunctionMode for ``nncf.quantize`` and + ``nncf.compress_weights``, which does not require torch namespace fixes. + Disabled by default, it can be enabled by the environment variable ``"NNCF_EXPERIMENTAL_TORCH_TRACING=1”``. + * Multiple improvements in TorchFX backend to comply with the Torch AO guidelines: + + * The constant folding pass is removed from the OpenVINO Quantizer and the ``quantize_pt2e`` + function. + * Support for dynamic shape TorchFX models. + + * Initial steps to adopt custom quantizers in quantize_pt2e within NNCF: + + * The hardware configuration is generalized with the narrow_range parameter. + * The quantizer parameter calculation code is refactored to explicitly depend on narrow_range. + + * Preview support of the OpenVINO backend in `ExecuTorch `__ + has been introduced, model quantization is implemented via the function: + `nncf.experimental.torch.fx.quantize_pt2e `__. + * PyTorch version 2.6 is now supported. + + **OpenVINO Tokenizers** + + * Support for Unigram tokenization models. + * Build OpenVINO Tokenizers with installed ICU (International Components for Unicode) + plugin for reduced binary size. + * max_length and padding rule parameters can be dynamically adjusted with Tokenizer class + from OpenVINO GenAI. + * Remove fast_tokenizer dependency, no core_tokenizers binary in the OpenVINO Tokenizers + distribution anymore. + + **OpenVINO.GenAI** + + * The following has been added: + + * Preview support for the Token Eviction mechanism for more efficient KVCache memory + management of LLMs during text generation. Disabled by default. + `See the sample `__. + * LLMPipeline C bindings and JavaScript bindings. + * StreamerBase::write(int64_t token) and + StreamerBase::write(const std::vector& tokens). + * Phi-3-vision-128k-instruct and Phi-3.5-vision-instruct support for VLMPipeline. + * Added Image2image and inpainting pipelines that support FLUX and Stable-Diffusion-3. + + * LLMPipeline now uses Paged Attention backend by default. + * Streaming is now performed in a separate thread while the next token is being inferred by LLM. + * Chat template is applied even with disabled chat mode. Use the ``apply_chat_template`` flag + to disable chat template in GenerationConfig. + * Time consuming methods now release Global Interpreter Lock (GIL). + + **Other Changes and Known Issues** + + *Windows PDB Archives*: + + | Archives containing PDB files for Windows packages are now available. + | You can find them right next to the regular archives, in the same folder. + + *Jupyter Notebooks* + + * `Qwen2.5VL `__ + * `Phi4-multimodal `__ + * `Gemma3 `__ + * `SigLIP2 `__ + * `YOLO v12 `__ + * `DeepSeek-VL2 `__ + * `LLasa `__ + * `GLM4-V `__ + * `GOT-OCR 2.0 `__ + * `OmniParser V2 `__ + * `Keras3 with OpenVINO backend `__ + + + *Known Issues* + + | **Component: NPU** + | ID: n/a + | Description: + | For LLM runs with prompts longer than the user may set through the MAX_PROMPT_LEN parameter, + an exception occurs, with a note providing the reason. In the current version of OpenVINO, + the message is not correct. in future releases, the explanation will be fixed. + + | **Component: NPU** + | ID: 164469 + | Description: + | With the NPU Linux driver release v1.13.0, a new behavior for NPU recovery in kernel + has been introduced. Corresponding changes in Ubuntu kernels are pending, targeting + new kernel releases. + | Workaround: + | If inference on NPU crashes, a manual reload of the driver is a recommended option + ``sudo rmmod intel_vpu`` ``sudo modprobe intel_vpu``. + A rollback to an earlier version of Linux NPU driver will also work. + + | **Component: GPU** + | ID: 164331 + | Description: + | Qwen2-VL model crashes on some Intel platforms when large inputs are used. + | Workaround: + | Build OpenVINO GenAI from source. + + | **Component: OpenVINO GenAI** + | ID: 165686 + | Description: + | In the VLM ContinuousBatching pipeline, when multiple requests are processed + using ``add_request()`` and ``step()`` API in multiple threads, the resulting + text is not correct. + | Workaround: + | Build OpenVINO GenAI from source. + .. dropdown:: 2025.0 - 05 February 2025 :animate: fade-in-slide-down :color: secondary @@ -663,8 +907,7 @@ Deprecation And Support +++++++++++++++++++++++++++++ Using deprecated features and components is not advised. They are available to enable a smooth -transition to new solutions and will be discontinued in the future. To keep using discontinued -features, you will have to revert to the last LTS OpenVINO version supporting them. +transition to new solutions and will be discontinued in the future. For more details, refer to: `OpenVINO Legacy Features and Components `__. @@ -713,7 +956,7 @@ Discontinued in 2025 Deprecated and to be removed in the future -------------------------------------------- - +* Python 3.9 is now deprecated and will be unavailable after OpenVINO version 2025.4. * ``openvino.Type.undefined`` is now deprecated and will be removed with version 2026.0. ``openvino.Type.dynamic`` should be used instead. * APT & YUM Repositories Restructure: @@ -734,13 +977,8 @@ Deprecated and to be removed in the future Full support will be removed later in 2025. * The `openvino` namespace of the OpenVINO Python API has been redesigned, removing the nested `openvino.runtime` module. The old namespace is now considered deprecated and will be - discontinued in 2026.0. - - - - - - + discontinued in 2026.0. A new namespace structure is available for immediate migration. + Details will be provided through warnings and documentation. @@ -775,4 +1013,4 @@ Copyright © 2025, Intel Corporation. All rights reserved. For more complete information about compiler optimizations, see our Optimization Notice. -Performance varies by use, configuration and other factors. \ No newline at end of file +Performance varies by use, configuration and other factors. diff --git a/docs/articles_en/get-started/install-openvino.rst b/docs/articles_en/get-started/install-openvino.rst index 6584c99284bdfb..29da71c8b3c3f0 100644 --- a/docs/articles_en/get-started/install-openvino.rst +++ b/docs/articles_en/get-started/install-openvino.rst @@ -22,15 +22,13 @@ Install OpenVINO™ 2025.1 - + OpenVINO 2025.1, described here, is not a Long-Term-Support version! All currently supported versions are: * 2025.1 (development) * 2024.6 (maintenance) -* 2023.3 (LTS), it will be deprecated at the end of 2025. - .. dropdown:: Effortless GenAI integration with OpenVINO GenAI diff --git a/docs/articles_en/get-started/install-openvino/configurations/configurations-intel-gpu.rst b/docs/articles_en/get-started/install-openvino/configurations/configurations-intel-gpu.rst index b369d5ef1087b0..38889b34efdbf0 100644 --- a/docs/articles_en/get-started/install-openvino/configurations/configurations-intel-gpu.rst +++ b/docs/articles_en/get-started/install-openvino/configurations/configurations-intel-gpu.rst @@ -133,7 +133,7 @@ Additional Resources #################### * :doc:`GPU Device <../../../openvino-workflow/running-inference/inference-devices-and-modes/gpu-device>` -* :doc:`Install Intel® Distribution of OpenVINO™ toolkit from a Docker Image <../install-openvino-archive-linux>` +* :doc:`Install Intel® Distribution of OpenVINO™ toolkit from a Docker Image <../install-openvino-docker-linux>` * `Docker CI framework for Intel® Distribution of OpenVINO™ toolkit `__ * `Get Started with DockerHub CI for Intel® Distribution of OpenVINO™ toolkit `__ * `Dockerfiles with Intel® Distribution of OpenVINO™ toolkit `__ diff --git a/docs/articles_en/get-started/install-openvino/install-openvino-conda.rst b/docs/articles_en/get-started/install-openvino/install-openvino-conda.rst index d28265e899c59b..1fd7ad05094e1c 100644 --- a/docs/articles_en/get-started/install-openvino/install-openvino-conda.rst +++ b/docs/articles_en/get-started/install-openvino/install-openvino-conda.rst @@ -12,7 +12,7 @@ Install OpenVINO™ Runtime from Conda Forge Note that the Conda Forge distribution: * offers both C/C++ and Python APIs - * does not offer support for NPU inference + * supports NPU inference on Linux only * is dedicated to users of all major OSes: Windows, Linux, and macOS (all x86_64 / arm64 architectures) diff --git a/docs/articles_en/get-started/install-openvino/install-openvino-docker-linux.rst b/docs/articles_en/get-started/install-openvino/install-openvino-docker-linux.rst index 5b8f24295e3283..2b4f85f419f850 100644 --- a/docs/articles_en/get-started/install-openvino/install-openvino-docker-linux.rst +++ b/docs/articles_en/get-started/install-openvino/install-openvino-docker-linux.rst @@ -24,10 +24,12 @@ You can get started easily with pre-built and published docker images, which are You can use the `available Dockerfiles on GitHub `__ or generate a Dockerfile with your settings via `DockerHub CI framework `__, which can generate a Dockerfile, build, test, and deploy an image using the Intel® Distribution of OpenVINO™ toolkit. + You can reuse available Dockerfiles, add your layer and customize the OpenVINO™ image to your needs. -The Docker CI repository includes guides on how to -`get started with docker images `__ and how to use -`OpenVINO™ Toolkit containers with GPU accelerators. `__ +The Docker CI repository includes the following guides: + +* `Get started with docker images `__ +* How to use OpenVINO™ Toolkit containers with `GPU accelerators `__ and `NPU accelerators `__. To start using Dockerfiles, install Docker Engine or a compatible container engine on your system: diff --git a/docs/articles_en/get-started/install-openvino/install-openvino-yum.rst b/docs/articles_en/get-started/install-openvino/install-openvino-yum.rst index e64594ea44b2c2..730e1c815879e4 100644 --- a/docs/articles_en/get-started/install-openvino/install-openvino-yum.rst +++ b/docs/articles_en/get-started/install-openvino/install-openvino-yum.rst @@ -11,7 +11,6 @@ Install OpenVINO™ Runtime on Linux From YUM Repository Note that the YUM distribution: * offers both C/C++ and Python APIs - * does not offer support for NPU inference * is dedicated to Linux users only * additionally includes code samples diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes.rst index b4f3722cb262a1..681b8a13c714fa 100644 --- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes.rst +++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes.rst @@ -15,33 +15,31 @@ Inference Devices and Modes inference-devices-and-modes/query-device-properties -The OpenVINO runtime offers multiple inference modes to enable the best hardware utilization under -different conditions: +The OpenVINO™ Runtime offers several inference modes to optimize hardware usage. +You can run inference on a single device or use automated modes that manage multiple devices: | **single-device inference** -| Define just one device responsible for the entire inference workload. It supports a range of - processors by means of the following plugins embedded in the Runtime library: +| This mode runs all inference on one selected device. The OpenVINO Runtime includes + built-in plugins that support the following devices: | :doc:`CPU ` | :doc:`GPU ` | :doc:`NPU ` | **automated inference modes** -| Assume certain level of automation in selecting devices for inference. They may potentially - increase your deployed solution's performance and portability. The automated modes are: +| These modes automate device selection and workload distribution, potentially increasing + performance and portability: | :doc:`Automatic Device Selection (AUTO) ` -| :doc:`Heterogeneous Execution (HETERO) ` -| :doc:`Automatic Batching Execution (Auto-batching) ` +| :doc:`Heterogeneous Execution (HETERO) ` across different device types +| :doc:`Automatic Batching Execution (Auto-batching) `: automatically groups inference requests to improve throughput -To learn how to change the device configuration, read the :doc:`Query device properties article `. +Learn how to configure devices in the :doc:`Query device properties ` article. Enumerating Available Devices ####################################### -The OpenVINO Runtime API features dedicated methods of enumerating devices and their capabilities. -Note that beyond the typical "CPU" or "GPU" device names, more qualified names are used when multiple -instances of a device are available (iGPU is always GPU.0). -The output you receive may look like this (truncated to device names only, two GPUs are listed -as an example): +The OpenVINO Runtime API provides methods to list available devices and their details. +When there are multiple instances of a device, they get specific names like GPU.0 for iGPU. +Here is an example of the output with device names, including two GPUs: .. code-block:: sh @@ -54,9 +52,10 @@ as an example): Device: GPU.1 -You may see how to obtain this information in the :doc:`Hello Query Device Sample <../../get-started/learn-openvino/openvino-samples/hello-query-device>`. -Here is an example of a simple programmatic way to enumerate the devices and use them with the -multi-device mode: +See the :doc:`Hello Query Device Sample <../../get-started/learn-openvino/openvino-samples/hello-query-device>` +for more details. + +Below is an example showing how to list available devices and use them with multi-device mode: .. tab-set:: @@ -67,8 +66,8 @@ multi-device mode: :language: cpp :fragment: [part2] -With two GPU devices used in one setup, the explicit configuration would be "MULTI:GPU.1,GPU.0". -Accordingly, the code that loops over all available devices of the "GPU" type only is as follows: +If you have two GPU devices, you can specify them explicitly as “MULTI:GPU.1,GPU.0”. +Here is how to list and use all available GPU devices: .. tab-set:: diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst index 3dc6e16bf8a0f5..4d73bf046dc62e 100644 --- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst +++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst @@ -8,31 +8,31 @@ CPU Device cpu-device/performance-hint-and-thread-scheduling .. meta:: - :description: The CPU plugin in the Intel® Distribution of OpenVINO™ toolkit - is developed to achieve high performance inference of neural - networks on Intel® x86-64 and Arm® CPUs. + :description: Explore the capabilities, performance features, and configuration options of the OpenVINO™ CPU plugin, including support for threading, precision control, caching, sparse weights, and runtime optimizations on Intel® x86-64 and Arm® CPUs. -The CPU plugin is a part of the Intel® Distribution of OpenVINO™ toolkit. It is developed to achieve high performance inference of neural networks on Intel® x86-64 and Arm® CPUs. The newer 11th generation and later Intel® CPUs provide even further performance boost, especially with INT8 models. -For an in-depth description of CPU plugin, see: +The CPU plugin is a part of the Intel® OpenVINO™ toolkit. It enables high-performance +inference of neural networks on Intel® x86-64 and Arm® CPUs. The newer 11th generation and +later Intel® CPUs provide even further performance boost, especially for INT8 models. +For more detailed description of CPU plugin, see: - `CPU plugin developer documentation `__. - `OpenVINO Runtime CPU plugin source files `__. .. note:: - The scope of the CPU plugin features and optimizations on Arm® may differ from - Intel® x86-64. If the limitation is not mentioned explicitly, the feature is supported for + Features and optimizations of the CPU plugin on Arm® may differ from Intel® x86-64. + If the limitation is not mentioned explicitly, the feature is supported for all CPU architectures. **CPU inference on ARM64 is not supported for Windows.** Device Name ########################################################### -The ``CPU`` device name is used for the CPU plugin. Even though there can be more than one -physical socket on a platform, only one device of this kind is listed by OpenVINO. +The ``CPU`` device name is used for the CPU plugin. Even if a platform has multiple physical +sockets, OpenVINO lists it as a single CPU device. On multi-socket platforms, load balancing and memory usage distribution between NUMA nodes are -handled automatically. In order to use CPU for inference, the device name should be passed to +handled automatically. To use CPU for inference, pass the device name to the ``ov::Core::compile_model()`` method: @@ -63,7 +63,7 @@ CPU plugin supports the following data types as inference precision of internal - ``FP32`` (Intel® x86-64, Arm®) - ``BF16`` (Intel® x86-64) - ``FP16`` (Intel® x86-64, Arm®) - - ``:ref:`MXFP4 ``` (Intel® x86-64) + - :ref:`MXFP4 ` (Intel® x86-64) - Integer data types: @@ -75,23 +75,25 @@ CPU plugin supports the following data types as inference precision of internal - ``INT8`` (Intel® x86-64) - ``uINT1`` (Intel® x86-64) -:doc:`Hello Query Device C++ Sample <../../../get-started/learn-openvino/openvino-samples/hello-query-device>` can be used to print out supported data types for all detected devices. +Use :doc:`Hello Query Device C++ Sample <../../../get-started/learn-openvino/openvino-samples/hello-query-device>` +to print out supported data types for all detected devices. Quantized Data Types Specifics +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Selected precision of each primitive depends on the operation precision in IR, quantization primitives, and available hardware capabilities. -The ``u1/u8/i8`` data types are used for quantized operations only, i.e., those are not selected automatically for non-quantized operations. +Selected precision of each primitive depends on the operation precision in IR, +quantization primitives, and available hardware capabilities. The ``u1/u8/i8`` data types are +used for quantized operations only. The types are not selected automatically for non-quantized operations. -For more details on how to get a quantized model see the :doc:`low-precision optimization guide <../../model-optimization>`. +For more details on how to get a quantized model, see the :doc:`low-precision optimization guide <../../model-optimization>`. .. note:: - Arm® platforms execute quantized models in simulation mode: the whole model (including quantization operations) is executed in floating-point precision. + Arm® platforms execute quantized models in simulation mode: the whole model, including quantization operations, is executed in floating-point precision. -Floating Point Data Types Specifics +Floating-Point Data Types Specifics +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ CPU plugin supports the following floating-point data types as inference precision of internal primitives: @@ -100,27 +102,33 @@ CPU plugin supports the following floating-point data types as inference precisi - ``bf16`` (Intel® x86-64) - ``f16`` (Intel® x86-64, Arm®) -The default floating-point precision of a CPU primitive is ``f32``. To support the ``f16`` OpenVINO IR on platforms that do not natively support ``float16``, the plugin internally converts -all the ``f16`` values to ``f32``, and all calculations are performed using the native precision of ``f32``. -On platforms that natively support half-precision calculations (``bfloat16`` or ``float16``), the half-precision type (``bf16`` or ``f16``) is automatically used instead -of ``f32`` to achieve better performance (see the `Execution Mode Hint <#execution-mode-hint>`__). -Thus, no special steps are required to run a model with ``bf16`` or ``f16`` inference precision. +The default floating-point precision of a CPU primitive is ``f32``. To support the ``f16`` +OpenVINO IR on platforms that do not natively support ``float16``, the plugin internally converts +all the ``f16`` values to ``f32``, and all calculations run using the native ``f32`` precision. +On platforms that support half-precision calculations (bfloat16 or float16), the plugin uses +the half-precision type (``bf16`` or ``f16``) automatically instead of ``f32`` to improve performance +(see the `Execution Mode Hint <#execution-mode-hint>`__). +No special steps are required to run a model with ``bf16`` or ``f16`` inference precision. .. important:: - The ``bf16`` floating-point precision appears to have some limitations that impact the - inference accuracy in LLM models. For more details, refer to this :ref:`article `. + The ``bf16`` floating-point precision may affect inference accuracy in LLM models. + For more details, refer to the :ref:`Precision Control article `. Using the half-precision provides the following performance benefits: -- ``bfloat16`` and ``float16`` data types enable Intel® Advanced Matrix Extension (AMX) on 4+ generation Intel® Xeon® Scalable Processors, resulting in significantly faster computations on the corresponding hardware compared to AVX512 or AVX2 instructions in many deep learning operation implementations. -- ``float16`` data type enables the ``armv8.2-a+fp16`` extension on ARM64 CPUs, which significantly improves performance due to the doubled vector capacity. -- Memory footprint is reduced since most weight and activation tensors are stored in half-precision. +- ``bfloat16`` and ``float16`` enable Intel® Advanced Matrix Extension (AMX) + on 4th-gen and newer generation Intel® Xeon® Scalable Processors, resulting in significantly faster + computations on the corresponding hardware compared to AVX512 or AVX2 for + many deep learning operations. +- ``float16`` enables the ``armv8.2-a+fp16`` extension on ARM64 CPUs, significantly improving + performance through doubled vector capacity. +- Memory footprint is reduced, as most weight and activation tensors are stored in half-precision. -For more details about the ``bfloat16`` format, see +For more details on the ``bfloat16`` format, see the `BFLOAT16 – Hardware Numerics Definition white paper `__. -To check if the CPU device can support the half-precision data type, use the :doc:`query device properties interface ` -to query ``ov::device::capabilities`` property, which should contain ``FP16`` or ``BF16`` in the list of CPU capabilities: +To check if the CPU device supports half-precision types, use the :doc:`query device properties interface ` +to query ``ov::device::capabilities`` property. If supported, ``FP16`` or ``BF16`` will appear in the list of CPU capabilities: .. tab-set:: @@ -143,8 +151,9 @@ to query ``ov::device::capabilities`` property, which should contain ``FP16`` or Inference Precision Hint ----------------------------------------------------------- -If the model has been converted to half-precision (``bf16`` or ``f16``), the ``ov::hint::inference_precision`` is set to ``ov::element::f16`` or ``ov::element::bf16`` and can be checked via -the ``ov::CompiledModel::get_property`` call. The code below demonstrates how to get the element type: +If a model has been converted to half-precision (``bf16`` or ``f16``), the ``ov::hint::inference_precision`` +is set to ``ov::element::f16`` or ``ov::element::bf16`` and can be checked via +the ``ov::CompiledModel::get_property`` call. The following code shows how to get the element type: .. tab-set:: @@ -162,7 +171,8 @@ the ``ov::CompiledModel::get_property`` call. The code below demonstrates how to :language: cpp :fragment: [part1] -To infer the model in ``f32`` precision instead of half-precision (``bf16`` or ``f16``) on targets with native half-precision support, set the ``ov::hint::inference_precision`` to ``ov::element::f32``. +To infer the model in ``f32`` precision instead of half-precision (``bf16`` or ``f16``) on +targets with native half-precision support, set the ``ov::hint::inference_precision`` to ``ov::element::f32``. .. tab-set:: @@ -183,29 +193,33 @@ To infer the model in ``f32`` precision instead of half-precision (``bf16`` or ` The ``Bfloat16`` software simulation mode is available on CPUs with Intel® AVX-512 instruction set that do not support the -native ``avx512_bf16`` instruction. This mode is used for development purposes and it does not guarantee good performance. -To enable the simulation, the ``ov::hint::inference_precision`` has to be explicitly set to ``ov::element::bf16``. +native ``avx512_bf16`` instruction. This mode is used for development purposes and does not guarantee optimal performance. +To enable simulation, explicitly set ``ov::hint::inference_precision`` to ``ov::element::bf16``. .. note:: - If ``ov::hint::inference_precision`` is set to ``ov::element::bf16`` on a CPU without native bfloat16 support or bfloat16 simulation mode, an exception is thrown. + If ``ov::hint::inference_precision`` is set to ``ov::element::bf16`` on a CPU without native + ``bfloat16`` support or ``bfloat16`` simulation mode, an exception is thrown. .. note:: - Due to the reduced mantissa size of half-precision data types (``bfloat16`` or ``float16``), the resulting half-precision inference accuracy may differ from the ``f32`` inference, - especially for models that were not trained using half-precision data types. If half-precision inference accuracy is not acceptable, - it is recommended to switch to the ``f32`` precision. Also, the performance/accuracy balance can be managed using the ``ov::hint::execution_mode`` hint, - see the `Execution Mode Hint <#execution-mode-hint>`__. + Due to reduced mantissa size of half-precision types (``bfloat16`` or ``float16``), + the resulting half-precision inference accuracy may differ from the ``f32`` inference, + especially for models not trained in half-precision. If accuracy is not acceptable, + it is recommended to switch to the ``f32`` precision. You can also balance performance and accuracy + using the ``ov::hint::execution_mode`` hint. See the `Execution Mode Hint <#execution-mode-hint>`__ for details. Execution Mode Hint ----------------------------------------------------------- -In case ``ov::hint::inference_precision`` is not explicitly set, one can use ``ov::hint::execution_mode`` hint to direct the run-time optimizations toward either better accuracy or better performance. -If ``ov::hint::execution_mode`` is set to ``ov::hint::ExecutionMode::PERFORMANCE`` (default behavior) and the platform natively supports half-precision -calculations (``bfloat16`` or ``float16``) then ``bf16`` or ``f16`` type is automatically used instead of ``f32`` to achieve better performance. -If the accuracy in this mode is not good enough, then set ``ov::hint::execution_mode`` to ``ov::hint::ExecutionMode::ACCURACY`` to enforce the plugin to -use the ``f32`` precision in floating point calculations. +If ``ov::hint::inference_precision`` is not explicitly set, you can use ``ov::hint::execution_mode`` +hint to direct the runtime optimizations toward either accuracy or performance. +When ``ov::hint::execution_mode`` is set to ``ov::hint::ExecutionMode::PERFORMANCE`` (the default), +and the platform supports half-precision (``bfloat16`` or ``float16``), the plugin +automatically uses ``bf16`` or ``f16`` instead of ``f32`` for better performance. +If accuracy is not acceptable, set ``ov::hint::execution_mode`` to ``ov::hint::ExecutionMode::ACCURACY`` +to enforce ``f32`` precision. -For more details and code examples, see the :doc:`Precision Control <../optimize-inference/precision-control>`. +For more details and code examples, see :doc:`Precision Control <../optimize-inference/precision-control>`. Supported Features ########################################################### @@ -213,8 +227,9 @@ Supported Features Automatic Device Selection +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -If a system includes OpenVINO-supported devices other than the CPU (e.g. an integrated GPU), then any supported model can be executed on all the devices simultaneously. -This can be achieved by specifying ``AUTO:CPU,GPU.0`` as a target device, and adding the ``CUMULATIVE_THROUGHPUT`` parameter. +Any supported model can run on all available supported devices simultaneously. +For example, with a CPU and an integrated GPU, set ``AUTO:CPU,GPU.0`` as the target device, +and add the ``CUMULATIVE_THROUGHPUT`` parameter. .. tab-set:: @@ -240,18 +255,19 @@ For more details, see the :doc:`Automatic Device Selection 1`` or ``ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)`` -property is set for CPU plugin, then multiple streams are created for the model. In case of CPU plugin, each stream has its own -host thread, which means that incoming infer requests can be processed simultaneously. Each stream is pinned to its own group of -physical cores with respect to NUMA nodes physical memory usage to minimize overhead on data transfer between NUMA nodes. +The CPU plugin creates multiple streams for the model when either ``ov::num_streams(n_streams)`` with ``n_streams > 1`` +or ``ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)`` is set. +Each stream has its own host thread, enabling simultaneous processing of inference requests. +Each stream is pinned to its own group of physical cores, aligned with NUMA nodes physical memory +usage, to minimize overhead on data transfer between NUMA nodes. For more details, see the :doc:`optimization guide <../optimize-inference>` and :doc:`thread scheduling introduction `. .. note:: - When it comes to latency, be aware that running only one stream on multi-socket platform may introduce additional overheads - on data transfer between NUMA nodes. In that case it is better to use the ``ov::hint::PerformanceMode::LATENCY`` performance hint. - For more details see the :doc:`performance hints <../optimize-inference/high-level-performance-hints>` overview. + On multi-socket platforms, running only one stream may increase the latency of + data transfers between NUMA nodes. To reduce this overhead, use the ``ov::hint::PerformanceMode::LATENCY`` hint. + For more details, see the :doc:`performance hints <../optimize-inference/high-level-performance-hints>` overview. Dynamic Shapes +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -260,11 +276,11 @@ CPU provides full functional support for models with dynamic shapes in terms of .. note:: - The CPU plugin does not support tensors with dynamically changing rank. In case of an attempt to infer a model with such tensors, an exception will be thrown. + The CPU plugin does not support tensors with dynamically changing rank. Inferring a model with such tensors will cause an exception. -Some runtime optimizations work better if the model shapes are known in advance. Therefore, if the input data shape is -not changed between inference calls, it is recommended to use a model with static shapes or reshape the existing model -with the static input shape to get the best performance. +Some runtime optimizations work better when model shapes are known in advance. If the input shape does +not changed between inference calls, it is recommended to use a model with static shapes or +reshape the existing model to a static input shape for better performance. .. tab-set:: @@ -289,11 +305,11 @@ For more details, see the :doc:`dynamic shapes guide <../model-input-output/dyna Preprocessing Acceleration +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CPU plugin supports a full set of the preprocessing operations, providing high performance implementations for them. +CPU plugin supports the full set of preprocessing operations, providing high performance implementations for them. For more details, see :doc:`preprocessing API guide <../optimize-inference/optimize-preprocessing>`. -.. dropdown:: The CPU plugin support for handling tensor precision conversion is limited to the following ov::element types: +.. dropdown:: The CPU plugin supports tensor precision conversion only for the following ov::element types: * ``bf16`` * ``f16`` @@ -313,65 +329,68 @@ For more details, see :doc:`preprocessing API guide <../optimize-inference/optim Model Caching +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CPU supports Import/Export network capability. If model caching is enabled via the common OpenVINO™ ``ov::cache_dir`` property, -the plugin automatically creates a cached blob inside the specified directory during model compilation. This cached blob contains -partial representation of the network, having performed common runtime optimizations and low precision transformations. -The next time the model is compiled, the cached representation will be loaded to the plugin instead of the initial OpenVINO IR, -so the aforementioned transformation steps will be skipped. These transformations take a significant amount of time during -model compilation, so caching this representation reduces time spent for subsequent compilations of the model, thereby reducing -first inference latency (FIL). +CPU plugin supports Import/Export model capability. When model caching is enabled via the +common OpenVINO™ ``ov::cache_dir`` property, the plugin automatically creates a cached blob +during model compilation. This blob contains a partially optimized version of the model, +including common runtime optimizations and low-precision transformations. + +On the next compilation, the plugin loads the cached version instead of the original OpenVINO IR. +This enables the plugin to skip the time-consuming transformation steps, +reducing model compilation time and first inference latency (FIL). For more details, see the :doc:`model caching <../optimize-inference/optimizing-latency/model-caching-overview>` overview. Extensibility +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CPU plugin supports fallback on ``ov::Op`` reference implementation if the plugin does not have its own implementation for such operation. -That means that :doc:`OpenVINO™ Extensibility Mechanism <../../../documentation/openvino-extensibility>` can be used for the plugin extension as well. -Enabling fallback on a custom operation implementation is possible by overriding the ``ov::Op::evaluate`` method in the derived operation -class (see :doc:`custom OpenVINO™ operations <../../../documentation/openvino-extensibility/custom-openvino-operations>` for details). +CPU plugin supports fallback on the ``ov::Op`` reference implementation if the plugin does not +have a native implementation for such operation. This means the :doc:`OpenVINO™ Extensibility Mechanism <../../../documentation/openvino-extensibility>` +can be used for the plugin extension as well. +To enable fallback for a custom operation, override the ``ov::Op::evaluate`` method in the derived operation +class. For more details, see :doc:`custom OpenVINO™ operations <../../../documentation/openvino-extensibility/custom-openvino-operations>`. Stateful Models +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The CPU plugin supports stateful models without any limitations. -For details, see :doc:`stateful models guide <../inference-request/stateful-models>`. +For details, see the :doc:`stateful models guide <../inference-request/stateful-models>`. Supported Properties ########################################################### The plugin supports the following properties: -Read-write Properties -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. tab-set:: -All parameters must be set before calling ``ov::Core::compile_model()`` in order to take effect or passed as additional argument to ``ov::Core::compile_model()`` - -- ``ov::enable_profiling`` -- ``ov::hint::inference_precision`` -- ``ov::hint::performance_mode`` -- ``ov::hint::execution_mode`` -- ``ov::hint::num_request`` -- ``ov::hint::scheduling_core_type`` -- ``ov::hint::enable_hyper_threading`` -- ``ov::hint::enable_cpu_reservation`` -- ``ov::hint::enable_cpu_pinning`` -- ``ov::num_streams`` -- ``ov::inference_num_threads`` -- ``ov::cache_dir`` -- ``ov::intel_cpu::denormals_optimization`` -- ``ov::intel_cpu::sparse_weights_decompression_rate`` - -Read-only properties -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + .. tab-item:: Read-write properties + + All parameters must be set or passed as additional arguments + before calling the ``ov::Core::compile_model()`` method: + + - ``ov::enable_profiling`` + - ``ov::hint::inference_precision`` + - ``ov::hint::performance_mode`` + - ``ov::hint::execution_mode`` + - ``ov::hint::num_request`` + - ``ov::hint::scheduling_core_type`` + - ``ov::hint::enable_hyper_threading`` + - ``ov::hint::enable_cpu_reservation`` + - ``ov::hint::enable_cpu_pinning`` + - ``ov::num_streams`` + - ``ov::inference_num_threads`` + - ``ov::cache_dir`` + - ``ov::intel_cpu::denormals_optimization`` + - ``ov::intel_cpu::sparse_weights_decompression_rate`` + + .. tab-item:: Read-only properties -- ``ov::supported_properties`` -- ``ov::available_devices`` -- ``ov::range_for_async_infer_requests`` -- ``ov::range_for_streams`` -- ``ov::device::full_name`` -- ``ov::device::capabilities`` + - ``ov::supported_properties`` + - ``ov::available_devices`` + - ``ov::range_for_async_infer_requests`` + - ``ov::range_for_streams`` + - ``ov::device::full_name`` + - ``ov::device::capabilities`` External Dependencies @@ -389,7 +408,7 @@ Optimization guide Multi-Threading Optimization +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CPU inference will infer an input or multiple inputs in parallel on multiple logical processors. +CPU inference will run one or multiple inputs in parallel on multiple logical processors. For more details, see the :doc:`thread scheduling introduction `. @@ -397,30 +416,31 @@ For more details, see the :doc:`thread scheduling introduction `. Both performance hints ensure optimal portability -and scalability of applications across various platforms and models. +``ov::hint::PerformanceMode::LATENCY`` and ``ov::hint::PerformanceMode::THROUGHPUT`` +:doc:`high-level performance hints <../../optimize-inference/high-level-performance-hints>`. +Both performance hints ensure optimal portability and scalability of applications across various platforms and models. - ``ov::inference_num_threads`` limits the number of logical processors used for CPU inference. - If the number set by the user is greater than the number of logical processors on the platform, - the multi-threading scheduler only uses the platform number for CPU inference. + If the value exceeds the number of the available processors on the platform, + the multi-threading scheduler only uses the available ones. - ``ov::num_streams`` limits the number of infer requests that can be run in parallel. - If the number set by the user is greater than the number of inference threads, multi-threading - scheduler only uses the number of inference threads to ensure that there is at least - one thread per stream. + If it exceeds the number of available inference threads, multi-threading + scheduler uses the number of available threads to ensure each stream has at least one thread. - ``ov::hint::scheduling_core_type`` specifies the type of CPU cores for CPU inference when - the user runs inference on a hybird platform that includes both Performance-cores (P-cores) + the user runs inference on a hybrid platform that includes both Performance-cores (P-cores) and Efficient-cores (E-cores). If the user platform only has one type of CPU core, this property has no effect, and CPU inference always uses this unique core type. - ``ov::hint::enable_hyper_threading`` limits the use of one or two logical processors per CPU - core when the platform has CPU hyperthreading enabled. + core when the platform has CPU hyper-threading enabled. If there is only one logical processor per CPU core, such as Efficient-cores, this property has no effect, and CPU inference uses all logical processors. -- ``ov::hint::enable_cpu_pinning`` enables CPU pinning during CPU inference. - If the user enables this property but the inference scenario does not support it, this +- ``ov::hint::enable_cpu_pinning`` enables CPU pinning during inference. + If the inference scenario does not support pinning, this property will be disabled during model compilation. For additional details on the above configurations, refer to @@ -37,12 +36,11 @@ Latency Hint ##################### In this scenario, the default setting of ``ov::hint::scheduling_core_type`` is determined by -the model precision and the ratio of P-cores and E-cores. +the model precision and the ratio of P-cores to E-cores. .. note:: - P-cores is short for Performance-cores and E-cores stands for Efficient-cores. These - types of cores are available starting with the 12th Gen Intel® Core™ processors. + Performance-cores (P-cores) and Efficient-cores (E-cores) are available starting with the 12th Gen Intel® Core™ processors. .. _core_type_latency: @@ -84,22 +82,22 @@ Then the default settings for low-level performance properties on Windows and Li - Both P-cores and E-cores are used for the Latency Hint on Intel® Core™ Ultra Processors on Windows, except in the case of large language models. - In case hyper-threading is enabled, two logical processors share the hardware resources - of one CPU core. OpenVINO does not expect to use both logical processors in one stream + of one CPU core. OpenVINO does not use both logical processors in one stream for a single infer request. So ``ov::hint::enable_hyper_threading`` is set to ``No`` in this scenario. - ``ov::hint::enable_cpu_pinning`` is disabled by default on Windows and macOS, and - enabled on Linux. Such default settings are aligned with typical workloads running - in the corresponding environments to guarantee better out-of-the-box (OOB) performance. + enabled on Linux. The default settings are aligned with typical workloads + in each environment to guarantee better out-of-the-box (OOB) performance. .. note:: Starting from 5th Gen Intel Xeon Processors, new microarchitecture enabled new sub-NUMA clusters feature. A sub-NUMA cluster (SNC) can create two or more localization domains (numa nodes) within a socket by BIOS configuration. - By default OpenVINO with latency hint uses single socket for inference. Although such - behavior allows to achive best performance for most of the models, there might be corner - cases which require manual tuning of ``ov::num_streams`` and ``ov::hint::enable_hyper_threading parameters``. - Please find more detail about `Sub-NUMA Clustering `__ + By default OpenVINO with latency hint uses single socket for inference. While this + behavior provides the best performance for most models, there may be corner + cases that require manual tuning of ``ov::num_streams`` and ``ov::hint::enable_hyper_threading parameters``. + For more details, see `Sub-NUMA Clustering `__ Throughput Hint ##################### @@ -174,7 +172,7 @@ perform multi-threading scheduling based on the limited available CPU. Intel® x86-64 CPU on Linux and Windows in the current release. In some use cases, OpenVINO Runtime will enable CPU thread pinning by default for better performance. -Users can also turn this feature on or off using the property ``ov::hint::enable_cpu_pinning``. +You can turn this feature on or off using the property ``ov::hint::enable_cpu_pinning``. Disabling thread pinning may be beneficial in complex applications where several workloads are executed in parallel. @@ -213,7 +211,7 @@ while other application logic uses OpenMP) will cause both to occupy CPU cores f Recommended solutions: -- The most effective way is to use oneTBB for all computations made in the pipeline. +- Use oneTBB for all computations in the pipeline for the best effect. - Rebuild OpenVINO with OpenMP if other application logic uses OpenMP. - Limit the number of threads for OpenVINO and other parts and let OS do the scheduling. - If other application logic uses OpenMP, set the environment variable `OMP_WAIT_POLICY `__ to `PASSIVE` to disable OpenMP `busy-wait `__. diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst index 162dcedd6a6b35..1462eb7efe2eff 100644 --- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst +++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst @@ -396,7 +396,8 @@ Supported Properties ####################################### The plugin supports the properties listed below. -- For more details on the properties, see the `Device Properties <../../../api/c_cpp_api/group__ov__runtime__cpp__prop__api.html>`. + +- For more details on the properties, see the `Device Properties `__. - For more details on usage of the properties, see the :doc:`Query Device Properties - Configuration `. - To check the exact list of available properties on target device, you can run :doc:`Hello Query Device C++ Sample <../../../get-started/learn-openvino/openvino-samples/hello-query-device>`. diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-advanced-inference.rst b/docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-advanced-inference.rst index 3680090891b7be..74c33c4b48a36d 100644 --- a/docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-advanced-inference.rst +++ b/docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-advanced-inference.rst @@ -9,16 +9,19 @@ OpenVINO™ Runtime Python API Advanced Inference .. warning:: - All mentioned methods are very dependent on a specific hardware and software set-up. + All methods described here are highly dependent on the specific hardware and software setup. Consider conducting your own experiments with various models and different input/output sizes. The methods presented here are not universal, they may or may not apply to the - specific pipeline. Please consider all tradeoffs and avoid premature optimizations. + specific pipeline. Consider all trade-offs and avoid premature optimizations. Direct Inference with ``CompiledModel`` ####################################### -The ``CompiledModel`` class provides the ``__call__`` method that runs a single synchronous inference using the given model. In addition to a compact code, all future calls to ``CompiledModel.__call__`` will result in less overhead, as the object reuses the already created ``InferRequest``. +The ``CompiledModel`` class provides the ``__call__`` method that runs a single synchronous +inference using the given model. In addition to a compact code, all future calls +to ``CompiledModel.__call__`` will result in less overhead, +as the object reuses the already created ``InferRequest``. .. doxygensnippet:: docs/articles_en/assets/snippets/ov_python_inference.py @@ -30,12 +33,12 @@ Shared Memory on Inputs and Outputs ################################### While using ``CompiledModel``, ``InferRequest`` and ``AsyncInferQueue``, -OpenVINO™ Runtime Python API provides an additional mode - "Shared Memory". +the OpenVINO™ Runtime Python API provides an additional mode: **Shared Memory**. Specify the ``share_inputs`` and ``share_outputs`` flag to enable or disable this feature. The "Shared Memory" mode may be beneficial when inputs or outputs are large and copying data is considered an expensive operation. This feature creates shared ``Tensor`` -instances with the "zero-copy" approach, reducing overhead of setting inputs +instances with the zero-copy approach, reducing overhead of setting inputs to minimum. For outputs this feature creates numpy views on data. Example usage: @@ -44,16 +47,19 @@ to minimum. For outputs this feature creates numpy views on data. Example usage: :fragment: [shared_memory_inference] -.. note:: - "Shared Memory" on inputs is enabled by default in ``CompiledModel.__call__``. - For other methods, like ``InferRequest.infer`` or ``InferRequest.start_async``, - it is required to set the flag to ``True`` manually. - "Shared Memory" on outputs is disabled by default in all sequential inference methods (``CompiledModel.__call__`` and ``InferRequest.infer``). It is required to set the flag to ``True`` manually. + +Shared Memory on inputs is enabled by default in ``CompiledModel.__call__``. +For other methods, like ``InferRequest.infer`` or ``InferRequest.start_async``, +it is required to set the flag to ``True`` manually. + +Shared Memory on outputs is disabled by default in all sequential inference methods +(``CompiledModel.__call__`` and ``InferRequest.infer``). It is required to set the flag to ``True`` manually. .. warning:: - When data is being shared, all modifications (including subsequent inference calls) may affect inputs and outputs of the inference! + When data is being shared, all modifications, including subsequent inference calls, + may affect inputs and outputs of the inference. Use this feature with caution, especially in multi-threaded/parallel code, where data can be modified outside of the function's control flow. @@ -76,14 +82,14 @@ Example usage: It is up to the user/developer to optimize the flow in a codebase to benefit from potential parallelization. -"Postponed Return" with Asynchronous Calls +Postponed Return with Asynchronous Calls ########################################## -"Postponed Return" is a practice to omit overhead of ``OVDict``, which is always returned from -synchronous calls. "Postponed Return" could be applied when: +Postponed Return is a practice to reduce overhead of returning ``OVDict`` from +synchronous calls. Postponed Return is useful in the following cases: -* only a part of output data is required. For example, only one specific output is significant in a given pipeline step and all outputs are large, thus, expensive to copy. -* data is not required "now". For example, it can be later extracted inside the pipeline as a part of latency hiding. +* only a part of output data is required. For example, only one specific output is significant in a given pipeline step and all outputs are large and expensive to copy. +* data is not required immediately. For example, it can be later extracted inside the pipeline as a part of latency hiding. * data return is not required at all. For example, models are being chained with the pure ``Tensor`` interface. diff --git a/docs/sphinx_setup/_static/download/benchmarking_OV_platform_list.pdf b/docs/sphinx_setup/_static/download/benchmarking_OV_platform_list.pdf index 4ce6ec2113c4d7..0dbfbce62d6285 100644 Binary files a/docs/sphinx_setup/_static/download/benchmarking_OV_platform_list.pdf and b/docs/sphinx_setup/_static/download/benchmarking_OV_platform_list.pdf differ diff --git a/docs/sphinx_setup/_static/download/benchmarking_OV_system_info_detailed.xlsx b/docs/sphinx_setup/_static/download/benchmarking_OV_system_info_detailed.xlsx index b40539c8133265..838e1d68862812 100644 --- a/docs/sphinx_setup/_static/download/benchmarking_OV_system_info_detailed.xlsx +++ b/docs/sphinx_setup/_static/download/benchmarking_OV_system_info_detailed.xlsx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:093ffd7d0eae944faade251367e0348dfb6c1212cdf6e118c150322c58b5eb0d -size 75950 +oid sha256:9fabe391db6647d9d8e9c1b52c523df992decb3352ab0b61348260acc355a8c1 +size 74506 diff --git a/docs/sphinx_setup/_static/selector-tool/assets/selector-C9h-51AS.js b/docs/sphinx_setup/_static/selector-tool/assets/selector-C9h-51AS.js deleted file mode 100644 index 3ea41e0c579cdc..00000000000000 --- a/docs/sphinx_setup/_static/selector-tool/assets/selector-C9h-51AS.js +++ /dev/null @@ -1,59 +0,0 @@ -var ch=Object.defineProperty;var fh=(o,i,s)=>i in o?ch(o,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[i]=s;var St=(o,i,s)=>fh(o,typeof i!="symbol"?i+"":i,s);function Ql(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Il={exports:{}},pi={},Rl={exports:{}},se={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var qc;function dh(){if(qc)return se;qc=1;var o=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),S=Symbol.iterator;function C(v){return v===null||typeof v!="object"?null:(v=S&&v[S]||v["@@iterator"],typeof v=="function"?v:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,V={};function R(v,I,W){this.props=v,this.context=I,this.refs=V,this.updater=W||E}R.prototype.isReactComponent={},R.prototype.setState=function(v,I){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,I,"setState")},R.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function L(){}L.prototype=R.prototype;function j(v,I,W){this.props=v,this.context=I,this.refs=V,this.updater=W||E}var M=j.prototype=new L;M.constructor=j,D(M,R.prototype),M.isPureReactComponent=!0;var K=Array.isArray,Z=Object.prototype.hasOwnProperty,$={current:null},re={key:!0,ref:!0,__self:!0,__source:!0};function ae(v,I,W){var ie,te={},ye=null,oe=null;if(I!=null)for(ie in I.ref!==void 0&&(oe=I.ref),I.key!==void 0&&(ye=""+I.key),I)Z.call(I,ie)&&!re.hasOwnProperty(ie)&&(te[ie]=I[ie]);var de=arguments.length-2;if(de===1)te.children=W;else if(1{const o={type:"size",height:document.body.offsetHeight};window.parent.postMessage(o)};new ResizeObserver(mh).observe(document.body);function Xe(o){"@babel/helpers - typeof";return Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xe(o)}function bt(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function gh(o,i){if(Xe(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var c=s.call(o,i);if(Xe(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}function $f(o){var i=gh(o,"string");return Xe(i)=="symbol"?i:i+""}function rf(o,i){for(var s=0;so.length)&&(i=o.length);for(var s=0,c=Array(i);s1&&arguments[1]!==void 0?arguments[1]:{};bt(this,o),this.init(i,s)}return Mt(o,[{key:"init",value:function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=c.prefix||"i18next:",this.logger=s||wh,this.options=c,this.debug=c.debug}},{key:"setDebug",value:function(s){this.debug=s}},{key:"log",value:function(){for(var s=arguments.length,c=new Array(s),a=0;a1?c-1:0),f=1;f-1?m.replace(/###/g,"."):m}function a(){return!o||typeof o=="string"}for(var f=typeof i!="string"?[].concat(i):i.split(".");f.length>1;){if(a())return{};var d=c(f.shift());!o[d]&&s&&(o[d]=new s),Object.prototype.hasOwnProperty.call(o,d)?o=o[d]:o={}}return a()?{}:{obj:o,k:c(f.shift())}}function uf(o,i,s){var c=Xl(o,i,Object),a=c.obj,f=c.k;a[f]=s}function xh(o,i,s,c){var a=Xl(o,i,Object),f=a.obj,d=a.k;f[d]=f[d]||[],f[d].push(s)}function Lo(o,i){var s=Xl(o,i),c=s.obj,a=s.k;if(c)return c[a]}function cf(o,i,s){var c=Lo(o,s);return c!==void 0?c:Lo(i,s)}function Gf(o,i,s){for(var c in i)c!=="__proto__"&&c!=="constructor"&&(c in o?typeof o[c]=="string"||o[c]instanceof String||typeof i[c]=="string"||i[c]instanceof String?s&&(o[c]=i[c]):Gf(o[c],i[c],s):o[c]=i[c]);return o}function xr(o){return o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Oh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Ph(o){return typeof o=="string"?o.replace(/[&<>"'\/]/g,function(i){return Oh[i]}):o}var Do=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,_h=[" ",",","?","!",";"];function Nh(o,i,s){i=i||"",s=s||"";var c=_h.filter(function(m){return i.indexOf(m)<0&&s.indexOf(m)<0});if(c.length===0)return!0;var a=new RegExp("(".concat(c.map(function(m){return m==="?"?"\\?":m}).join("|"),")")),f=!a.test(o);if(!f){var d=o.indexOf(s);d>0&&!a.test(o.substring(0,d))&&(f=!0)}return f}function ff(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);i&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),s.push.apply(s,c)}return s}function Co(o){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wf(o,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(o){if(o[i])return o[i];for(var c=i.split(s),a=o,f=0;ff+d;)d++,m=c.slice(f,f+d).join(s),g=a[m];if(g===void 0)return;if(g===null)return null;if(i.endsWith(m)){if(typeof g=="string")return g;if(m&&typeof g[m]=="string")return g[m]}var N=c.slice(f+d).join(s);return N?Wf(g,N,s):void 0}a=a[c[f]]}return a}}var jh=function(o){Uo(s,o);var i=Ch(s);function s(c){var a,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return bt(this,s),a=i.call(this),Do&&jn.call(En(a)),a.data=c||{},a.options=f,a.options.keySeparator===void 0&&(a.options.keySeparator="."),a.options.ignoreJSONStructure===void 0&&(a.options.ignoreJSONStructure=!0),a}return Mt(s,[{key:"addNamespaces",value:function(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}},{key:"removeNamespaces",value:function(a){var f=this.options.ns.indexOf(a);f>-1&&this.options.ns.splice(f,1)}},{key:"getResource",value:function(a,f,d){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=m.keySeparator!==void 0?m.keySeparator:this.options.keySeparator,N=m.ignoreJSONStructure!==void 0?m.ignoreJSONStructure:this.options.ignoreJSONStructure,P=[a,f];d&&typeof d!="string"&&(P=P.concat(d)),d&&typeof d=="string"&&(P=P.concat(g?d.split(g):d)),a.indexOf(".")>-1&&(P=a.split("."));var S=Lo(this.data,P);return S||!N||typeof d!="string"?S:Wf(this.data&&this.data[a]&&this.data[a][f],d,g)}},{key:"addResource",value:function(a,f,d,m){var g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},N=this.options.keySeparator;N===void 0&&(N=".");var P=[a,f];d&&(P=P.concat(N?d.split(N):d)),a.indexOf(".")>-1&&(P=a.split("."),m=f,f=P[1]),this.addNamespaces(f),uf(this.data,P,m),g.silent||this.emit("added",a,f,d,m)}},{key:"addResources",value:function(a,f,d){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var g in d)(typeof d[g]=="string"||Object.prototype.toString.apply(d[g])==="[object Array]")&&this.addResource(a,f,g,d[g],{silent:!0});m.silent||this.emit("added",a,f,d)}},{key:"addResourceBundle",value:function(a,f,d,m,g){var N=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},P=[a,f];a.indexOf(".")>-1&&(P=a.split("."),m=d,d=f,f=P[1]),this.addNamespaces(f);var S=Lo(this.data,P)||{};m?Gf(S,d,g):S=Co(Co({},S),d),uf(this.data,P,S),N.silent||this.emit("added",a,f,d)}},{key:"removeResourceBundle",value:function(a,f){this.hasResourceBundle(a,f)&&delete this.data[a][f],this.removeNamespaces(f),this.emit("removed",a,f)}},{key:"hasResourceBundle",value:function(a,f){return this.getResource(a,f)!==void 0}},{key:"getResourceBundle",value:function(a,f){return f||(f=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Co(Co({},{}),this.getResource(a,f)):this.getResource(a,f)}},{key:"getDataByLanguage",value:function(a){return this.data[a]}},{key:"hasLanguageSomeTranslations",value:function(a){var f=this.getDataByLanguage(a),d=f&&Object.keys(f)||[];return!!d.find(function(m){return f[m]&&Object.keys(f[m]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),s}(jn),Yf={processors:{},addPostProcessor:function(i){this.processors[i.name]=i},handle:function(i,s,c,a,f){var d=this;return i.forEach(function(m){d.processors[m]&&(s=d.processors[m].process(s,c,a,f))}),s}};function df(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);i&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),s.push.apply(s,c)}return s}function ot(o){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var pf={},hf=function(o){Uo(s,o);var i=Ih(s);function s(c){var a,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return bt(this,s),a=i.call(this),Do&&jn.call(En(a)),Sh(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],c,En(a)),a.options=f,a.options.keySeparator===void 0&&(a.options.keySeparator="."),a.logger=Yt.create("translator"),a}return Mt(s,[{key:"changeLanguage",value:function(a){a&&(this.language=a)}},{key:"exists",value:function(a){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(a==null)return!1;var d=this.resolve(a,f);return d&&d.res!==void 0}},{key:"extractFromKey",value:function(a,f){var d=f.nsSeparator!==void 0?f.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");var m=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,g=f.ns||this.options.defaultNS||[],N=d&&a.indexOf(d)>-1,P=!this.options.userDefinedKeySeparator&&!f.keySeparator&&!this.options.userDefinedNsSeparator&&!f.nsSeparator&&!Nh(a,d,m);if(N&&!P){var S=a.match(this.interpolator.nestingRegexp);if(S&&S.length>0)return{key:a,namespaces:g};var C=a.split(d);(d!==m||d===m&&this.options.ns.indexOf(C[0])>-1)&&(g=C.shift()),a=C.join(m)}return typeof g=="string"&&(g=[g]),{key:a,namespaces:g}}},{key:"translate",value:function(a,f,d){var m=this;if(Xe(f)!=="object"&&this.options.overloadTranslationOptionHandler&&(f=this.options.overloadTranslationOptionHandler(arguments)),f||(f={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);var g=f.returnDetails!==void 0?f.returnDetails:this.options.returnDetails,N=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,P=this.extractFromKey(a[a.length-1],f),S=P.key,C=P.namespaces,E=C[C.length-1],D=f.lng||this.language,V=f.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(D&&D.toLowerCase()==="cimode"){if(V){var R=f.nsSeparator||this.options.nsSeparator;return g?{res:"".concat(E).concat(R).concat(S),usedKey:S,exactUsedKey:S,usedLng:D,usedNS:E}:"".concat(E).concat(R).concat(S)}return g?{res:S,usedKey:S,exactUsedKey:S,usedLng:D,usedNS:E}:S}var L=this.resolve(a,f),j=L&&L.res,M=L&&L.usedKey||S,K=L&&L.exactUsedKey||S,Z=Object.prototype.toString.apply(j),$=["[object Number]","[object Function]","[object RegExp]"],re=f.joinArrays!==void 0?f.joinArrays:this.options.joinArrays,ae=!this.i18nFormat||this.i18nFormat.handleAsObject,ce=typeof j!="string"&&typeof j!="boolean"&&typeof j!="number";if(ae&&j&&ce&&$.indexOf(Z)<0&&!(typeof re=="string"&&Z==="[object Array]")){if(!f.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,j,ot(ot({},f),{},{ns:C})):"key '".concat(S," (").concat(this.language,")' returned an object instead of string.");return g?(L.res=q,L):q}if(N){var je=Z==="[object Array]",Ve=je?[]:{},We=je?K:M;for(var Fe in j)if(Object.prototype.hasOwnProperty.call(j,Fe)){var nt="".concat(We).concat(N).concat(Fe);Ve[Fe]=this.translate(nt,ot(ot({},f),{joinArrays:!1,ns:C})),Ve[Fe]===nt&&(Ve[Fe]=j[Fe])}j=Ve}}else if(ae&&typeof re=="string"&&Z==="[object Array]")j=j.join(re),j&&(j=this.extendTranslation(j,a,f,d));else{var Ie=!1,me=!1,z=f.count!==void 0&&typeof f.count!="string",Q=s.hasDefaultValue(f),v=z?this.pluralResolver.getSuffix(D,f.count,f):"",I=f["defaultValue".concat(v)]||f.defaultValue;!this.isValidLookup(j)&&Q&&(Ie=!0,j=I),this.isValidLookup(j)||(me=!0,j=S);var W=f.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ie=W&&me?void 0:j,te=Q&&I!==j&&this.options.updateMissing;if(me||Ie||te){if(this.logger.log(te?"updateKey":"missingKey",D,E,S,te?I:j),N){var ye=this.resolve(S,ot(ot({},f),{},{keySeparator:!1}));ye&&ye.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var oe=[],de=this.languageUtils.getFallbackCodes(this.options.fallbackLng,f.lng||this.language);if(this.options.saveMissingTo==="fallback"&&de&&de[0])for(var ue=0;ue1&&arguments[1]!==void 0?arguments[1]:{},m,g,N,P,S;return typeof a=="string"&&(a=[a]),a.forEach(function(C){if(!f.isValidLookup(m)){var E=f.extractFromKey(C,d),D=E.key;g=D;var V=E.namespaces;f.options.fallbackNS&&(V=V.concat(f.options.fallbackNS));var R=d.count!==void 0&&typeof d.count!="string",L=R&&!d.ordinal&&d.count===0&&f.pluralResolver.shouldUseIntlApi(),j=d.context!==void 0&&(typeof d.context=="string"||typeof d.context=="number")&&d.context!=="",M=d.lngs?d.lngs:f.languageUtils.toResolveHierarchy(d.lng||f.language,d.fallbackLng);V.forEach(function(K){f.isValidLookup(m)||(S=K,!pf["".concat(M[0],"-").concat(K)]&&f.utils&&f.utils.hasLoadedNamespace&&!f.utils.hasLoadedNamespace(S)&&(pf["".concat(M[0],"-").concat(K)]=!0,f.logger.warn('key "'.concat(g,'" for languages "').concat(M.join(", "),`" won't get resolved as namespace "`).concat(S,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),M.forEach(function(Z){if(!f.isValidLookup(m)){P=Z;var $=[D];if(f.i18nFormat&&f.i18nFormat.addLookupKeys)f.i18nFormat.addLookupKeys($,D,Z,K,d);else{var re;R&&(re=f.pluralResolver.getSuffix(Z,d.count,d));var ae="".concat(f.options.pluralSeparator,"zero");if(R&&($.push(D+re),L&&$.push(D+ae)),j){var ce="".concat(D).concat(f.options.contextSeparator).concat(d.context);$.push(ce),R&&($.push(ce+re),L&&$.push(ce+ae))}}for(var q;q=$.pop();)f.isValidLookup(m)||(N=q,m=f.getResource(Z,K,q,d))}}))})}}),{res:m,usedKey:g,exactUsedKey:N,usedLng:P,usedNS:S}}},{key:"isValidLookup",value:function(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}},{key:"getResource",value:function(a,f,d){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(a,f,d,m):this.resourceStore.getResource(a,f,d,m)}}],[{key:"hasDefaultValue",value:function(a){var f="defaultValue";for(var d in a)if(Object.prototype.hasOwnProperty.call(a,d)&&f===d.substring(0,f.length)&&a[d]!==void 0)return!0;return!1}}]),s}(jn);function Ll(o){return o.charAt(0).toUpperCase()+o.slice(1)}var mf=function(){function o(i){bt(this,o),this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yt.create("languageUtils")}return Mt(o,[{key:"getScriptPartFromCode",value:function(s){if(!s||s.indexOf("-")<0)return null;var c=s.split("-");return c.length===2||(c.pop(),c[c.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(c.join("-"))}},{key:"getLanguagePartFromCode",value:function(s){if(!s||s.indexOf("-")<0)return s;var c=s.split("-");return this.formatLanguageCode(c[0])}},{key:"formatLanguageCode",value:function(s){if(typeof s=="string"&&s.indexOf("-")>-1){var c=["hans","hant","latn","cyrl","cans","mong","arab"],a=s.split("-");return this.options.lowerCaseLng?a=a.map(function(f){return f.toLowerCase()}):a.length===2?(a[0]=a[0].toLowerCase(),a[1]=a[1].toUpperCase(),c.indexOf(a[1].toLowerCase())>-1&&(a[1]=Ll(a[1].toLowerCase()))):a.length===3&&(a[0]=a[0].toLowerCase(),a[1].length===2&&(a[1]=a[1].toUpperCase()),a[0]!=="sgn"&&a[2].length===2&&(a[2]=a[2].toUpperCase()),c.indexOf(a[1].toLowerCase())>-1&&(a[1]=Ll(a[1].toLowerCase())),c.indexOf(a[2].toLowerCase())>-1&&(a[2]=Ll(a[2].toLowerCase()))),a.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?s.toLowerCase():s}},{key:"isSupportedCode",value:function(s){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(s=this.getLanguagePartFromCode(s)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(s)>-1}},{key:"getBestMatchFromCodes",value:function(s){var c=this;if(!s)return null;var a;return s.forEach(function(f){if(!a){var d=c.formatLanguageCode(f);(!c.options.supportedLngs||c.isSupportedCode(d))&&(a=d)}}),!a&&this.options.supportedLngs&&s.forEach(function(f){if(!a){var d=c.getLanguagePartFromCode(f);if(c.isSupportedCode(d))return a=d;a=c.options.supportedLngs.find(function(m){if(m.indexOf(d)===0)return m})}}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}},{key:"getFallbackCodes",value:function(s,c){if(!s)return[];if(typeof s=="function"&&(s=s(c)),typeof s=="string"&&(s=[s]),Object.prototype.toString.apply(s)==="[object Array]")return s;if(!c)return s.default||[];var a=s[c];return a||(a=s[this.getScriptPartFromCode(c)]),a||(a=s[this.formatLanguageCode(c)]),a||(a=s[this.getLanguagePartFromCode(c)]),a||(a=s.default),a||[]}},{key:"toResolveHierarchy",value:function(s,c){var a=this,f=this.getFallbackCodes(c||this.options.fallbackLng||[],s),d=[],m=function(N){N&&(a.isSupportedCode(N)?d.push(N):a.logger.warn("rejecting language code not found in supportedLngs: ".concat(N)))};return typeof s=="string"&&s.indexOf("-")>-1?(this.options.load!=="languageOnly"&&m(this.formatLanguageCode(s)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&m(this.getScriptPartFromCode(s)),this.options.load!=="currentOnly"&&m(this.getLanguagePartFromCode(s))):typeof s=="string"&&m(this.formatLanguageCode(s)),f.forEach(function(g){d.indexOf(g)<0&&m(a.formatLanguageCode(g))}),d}}]),o}(),Lh=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Th={1:function(i){return+(i>1)},2:function(i){return+(i!=1)},3:function(i){return 0},4:function(i){return i%10==1&&i%100!=11?0:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?1:2},5:function(i){return i==0?0:i==1?1:i==2?2:i%100>=3&&i%100<=10?3:i%100>=11?4:5},6:function(i){return i==1?0:i>=2&&i<=4?1:2},7:function(i){return i==1?0:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?1:2},8:function(i){return i==1?0:i==2?1:i!=8&&i!=11?2:3},9:function(i){return+(i>=2)},10:function(i){return i==1?0:i==2?1:i<7?2:i<11?3:4},11:function(i){return i==1||i==11?0:i==2||i==12?1:i>2&&i<20?2:3},12:function(i){return+(i%10!=1||i%100==11)},13:function(i){return+(i!==0)},14:function(i){return i==1?0:i==2?1:i==3?2:3},15:function(i){return i%10==1&&i%100!=11?0:i%10>=2&&(i%100<10||i%100>=20)?1:2},16:function(i){return i%10==1&&i%100!=11?0:i!==0?1:2},17:function(i){return i==1||i%10==1&&i%100!=11?0:1},18:function(i){return i==0?0:i==1?1:2},19:function(i){return i==1?0:i==0||i%100>1&&i%100<11?1:i%100>10&&i%100<20?2:3},20:function(i){return i==1?0:i==0||i%100>0&&i%100<20?1:2},21:function(i){return i%100==1?1:i%100==2?2:i%100==3||i%100==4?3:0},22:function(i){return i==1?0:i==2?1:(i<0||i>10)&&i%10==0?2:3}},Ah=["v1","v2","v3"],gf={zero:0,one:1,two:2,few:3,many:4,other:5};function Uh(){var o={};return Lh.forEach(function(i){i.lngs.forEach(function(s){o[s]={numbers:i.nr,plurals:Th[i.fc]}})}),o}var Dh=function(){function o(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bt(this,o),this.languageUtils=i,this.options=s,this.logger=Yt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Uh()}return Mt(o,[{key:"addRule",value:function(s,c){this.rules[s]=c}},{key:"getRule",value:function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(s,{type:c.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[s]||this.rules[this.languageUtils.getLanguagePartFromCode(s)]}},{key:"needsPlural",value:function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(s,c);return this.shouldUseIntlApi()?a&&a.resolvedOptions().pluralCategories.length>1:a&&a.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(s,c){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(s,a).map(function(f){return"".concat(c).concat(f)})}},{key:"getSuffixes",value:function(s){var c=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=this.getRule(s,a);return f?this.shouldUseIntlApi()?f.resolvedOptions().pluralCategories.sort(function(d,m){return gf[d]-gf[m]}).map(function(d){return"".concat(c.options.prepend).concat(d)}):f.numbers.map(function(d){return c.getSuffix(s,d,a)}):[]}},{key:"getSuffix",value:function(s,c){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=this.getRule(s,a);return f?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(f.select(c)):this.getSuffixRetroCompatible(f,c):(this.logger.warn("no plural rule found for: ".concat(s)),"")}},{key:"getSuffixRetroCompatible",value:function(s,c){var a=this,f=s.noAbs?s.plurals(c):s.plurals(Math.abs(c)),d=s.numbers[f];this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1&&(d===2?d="plural":d===1&&(d=""));var m=function(){return a.options.prepend&&d.toString()?a.options.prepend+d.toString():d.toString()};return this.options.compatibilityJSON==="v1"?d===1?"":typeof d=="number"?"_plural_".concat(d.toString()):m():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1?m():this.options.prepend&&f.toString()?this.options.prepend+f.toString():f.toString()}},{key:"shouldUseIntlApi",value:function(){return!Ah.includes(this.options.compatibilityJSON)}}]),o}();function vf(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);i&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),s.push.apply(s,c)}return s}function Vt(o){for(var i=1;i0&&arguments[0]!==void 0?arguments[0]:{};bt(this,o),this.logger=Yt.create("interpolator"),this.options=i,this.format=i.interpolation&&i.interpolation.format||function(s){return s},this.init(i)}return Mt(o,[{key:"init",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.interpolation||(s.interpolation={escapeValue:!0});var c=s.interpolation;this.escape=c.escape!==void 0?c.escape:Ph,this.escapeValue=c.escapeValue!==void 0?c.escapeValue:!0,this.useRawValueToEscape=c.useRawValueToEscape!==void 0?c.useRawValueToEscape:!1,this.prefix=c.prefix?xr(c.prefix):c.prefixEscaped||"{{",this.suffix=c.suffix?xr(c.suffix):c.suffixEscaped||"}}",this.formatSeparator=c.formatSeparator?c.formatSeparator:c.formatSeparator||",",this.unescapePrefix=c.unescapeSuffix?"":c.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":c.unescapeSuffix||"",this.nestingPrefix=c.nestingPrefix?xr(c.nestingPrefix):c.nestingPrefixEscaped||xr("$t("),this.nestingSuffix=c.nestingSuffix?xr(c.nestingSuffix):c.nestingSuffixEscaped||xr(")"),this.nestingOptionsSeparator=c.nestingOptionsSeparator?c.nestingOptionsSeparator:c.nestingOptionsSeparator||",",this.maxReplaces=c.maxReplaces?c.maxReplaces:1e3,this.alwaysFormat=c.alwaysFormat!==void 0?c.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var s="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(s,"g");var c="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(c,"g");var a="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(a,"g")}},{key:"interpolate",value:function(s,c,a,f){var d=this,m,g,N,P=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function S(R){return R.replace(/\$/g,"$$$$")}var C=function(L){if(L.indexOf(d.formatSeparator)<0){var j=cf(c,P,L);return d.alwaysFormat?d.format(j,void 0,a,Vt(Vt(Vt({},f),c),{},{interpolationkey:L})):j}var M=L.split(d.formatSeparator),K=M.shift().trim(),Z=M.join(d.formatSeparator).trim();return d.format(cf(c,P,K),Z,a,Vt(Vt(Vt({},f),c),{},{interpolationkey:K}))};this.resetRegExp();var E=f&&f.missingInterpolationHandler||this.options.missingInterpolationHandler,D=f&&f.interpolation&&f.interpolation.skipOnVariables!==void 0?f.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,V=[{regex:this.regexpUnescape,safeValue:function(L){return S(L)}},{regex:this.regexp,safeValue:function(L){return d.escapeValue?S(d.escape(L)):S(L)}}];return V.forEach(function(R){for(N=0;m=R.regex.exec(s);){var L=m[1].trim();if(g=C(L),g===void 0)if(typeof E=="function"){var j=E(s,m,f);g=typeof j=="string"?j:""}else if(f&&Object.prototype.hasOwnProperty.call(f,L))g="";else if(D){g=m[0];continue}else d.logger.warn("missed to pass in variable ".concat(L," for interpolating ").concat(s)),g="";else typeof g!="string"&&!d.useRawValueToEscape&&(g=af(g));var M=R.safeValue(g);if(s=s.replace(m[0],M),D?(R.regex.lastIndex+=g.length,R.regex.lastIndex-=m[0].length):R.regex.lastIndex=0,N++,N>=d.maxReplaces)break}}),s}},{key:"nest",value:function(s,c){var a=this,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,m,g;function N(E,D){var V=this.nestingOptionsSeparator;if(E.indexOf(V)<0)return E;var R=E.split(new RegExp("".concat(V,"[ ]*{"))),L="{".concat(R[1]);E=R[0],L=this.interpolate(L,g);var j=L.match(/'/g),M=L.match(/"/g);(j&&j.length%2===0&&!M||M.length%2!==0)&&(L=L.replace(/'/g,'"'));try{g=JSON.parse(L),D&&(g=Vt(Vt({},D),g))}catch(K){return this.logger.warn("failed parsing options string in nesting for key ".concat(E),K),"".concat(E).concat(V).concat(L)}return delete g.defaultValue,E}for(;d=this.nestingRegexp.exec(s);){var P=[];g=Vt({},f),g=g.replace&&typeof g.replace!="string"?g.replace:g,g.applyPostProcessor=!1,delete g.defaultValue;var S=!1;if(d[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(d[1])){var C=d[1].split(this.formatSeparator).map(function(E){return E.trim()});d[1]=C.shift(),P=C,S=!0}if(m=c(N.call(this,d[1].trim(),g),g),m&&d[0]===s&&typeof m!="string")return m;typeof m!="string"&&(m=af(m)),m||(this.logger.warn("missed to resolve ".concat(d[1]," for nesting ").concat(s)),m=""),S&&(m=P.reduce(function(E,D){return a.format(E,D,f.lng,Vt(Vt({},f),{},{interpolationkey:d[1].trim()}))},m.trim())),s=s.replace(d[0],m),this.regexp.lastIndex=0}return s}}]),o}();function yf(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);i&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),s.push.apply(s,c)}return s}function sn(o){for(var i=1;i-1){var c=o.split("(");i=c[0].toLowerCase().trim();var a=c[1].substring(0,c[1].length-1);if(i==="currency"&&a.indexOf(":")<0)s.currency||(s.currency=a.trim());else if(i==="relativetime"&&a.indexOf(":")<0)s.range||(s.range=a.trim());else{var f=a.split(";");f.forEach(function(d){if(d){var m=d.split(":"),g=yh(m),N=g[0],P=g.slice(1),S=P.join(":").trim().replace(/^'+|'+$/g,"");s[N.trim()]||(s[N.trim()]=S),S==="false"&&(s[N.trim()]=!1),S==="true"&&(s[N.trim()]=!0),isNaN(S)||(s[N.trim()]=parseInt(S,10))}})}}return{formatName:i,formatOptions:s}}function Or(o){var i={};return function(c,a,f){var d=a+JSON.stringify(f),m=i[d];return m||(m=o(a,f),i[d]=m),m(c)}}var Vh=function(){function o(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bt(this,o),this.logger=Yt.create("formatter"),this.options=i,this.formats={number:Or(function(s,c){var a=new Intl.NumberFormat(s,sn({},c));return function(f){return a.format(f)}}),currency:Or(function(s,c){var a=new Intl.NumberFormat(s,sn(sn({},c),{},{style:"currency"}));return function(f){return a.format(f)}}),datetime:Or(function(s,c){var a=new Intl.DateTimeFormat(s,sn({},c));return function(f){return a.format(f)}}),relativetime:Or(function(s,c){var a=new Intl.RelativeTimeFormat(s,sn({},c));return function(f){return a.format(f,c.range||"day")}}),list:Or(function(s,c){var a=new Intl.ListFormat(s,sn({},c));return function(f){return a.format(f)}})},this.init(i)}return Mt(o,[{key:"init",value:function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},a=c.interpolation;this.formatSeparator=a.formatSeparator?a.formatSeparator:a.formatSeparator||","}},{key:"add",value:function(s,c){this.formats[s.toLowerCase().trim()]=c}},{key:"addCached",value:function(s,c){this.formats[s.toLowerCase().trim()]=Or(c)}},{key:"format",value:function(s,c,a){var f=this,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=c.split(this.formatSeparator),g=m.reduce(function(N,P){var S=zh(P),C=S.formatName,E=S.formatOptions;if(f.formats[C]){var D=N;try{var V=d&&d.formatParams&&d.formatParams[d.interpolationkey]||{},R=V.locale||V.lng||d.locale||d.lng||a;D=f.formats[C](N,R,sn(sn(sn({},E),d),V))}catch(L){f.logger.warn(L)}return D}else f.logger.warn("there was no format function for ".concat(C));return N},s);return g}}]),o}();function wf(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);i&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),s.push.apply(s,c)}return s}function kf(o){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $h(o,i){o.pending[i]!==void 0&&(delete o.pending[i],o.pendingCount--)}var Bh=function(o){Uo(s,o);var i=bh(s);function s(c,a,f){var d,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return bt(this,s),d=i.call(this),Do&&jn.call(En(d)),d.backend=c,d.store=a,d.services=f,d.languageUtils=f.languageUtils,d.options=m,d.logger=Yt.create("backendConnector"),d.waitingReads=[],d.maxParallelReads=m.maxParallelReads||10,d.readingCalls=0,d.maxRetries=m.maxRetries>=0?m.maxRetries:5,d.retryTimeout=m.retryTimeout>=1?m.retryTimeout:350,d.state={},d.queue=[],d.backend&&d.backend.init&&d.backend.init(f,m.backend,m),d}return Mt(s,[{key:"queueLoad",value:function(a,f,d,m){var g=this,N={},P={},S={},C={};return a.forEach(function(E){var D=!0;f.forEach(function(V){var R="".concat(E,"|").concat(V);!d.reload&&g.store.hasResourceBundle(E,V)?g.state[R]=2:g.state[R]<0||(g.state[R]===1?P[R]===void 0&&(P[R]=!0):(g.state[R]=1,D=!1,P[R]===void 0&&(P[R]=!0),N[R]===void 0&&(N[R]=!0),C[V]===void 0&&(C[V]=!0)))}),D||(S[E]=!0)}),(Object.keys(N).length||Object.keys(P).length)&&this.queue.push({pending:P,pendingCount:Object.keys(P).length,loaded:{},errors:[],callback:m}),{toLoad:Object.keys(N),pending:Object.keys(P),toLoadLanguages:Object.keys(S),toLoadNamespaces:Object.keys(C)}}},{key:"loaded",value:function(a,f,d){var m=a.split("|"),g=m[0],N=m[1];f&&this.emit("failedLoading",g,N,f),d&&this.store.addResourceBundle(g,N,d),this.state[a]=f?-1:2;var P={};this.queue.forEach(function(S){xh(S.loaded,[g],N),$h(S,a),f&&S.errors.push(f),S.pendingCount===0&&!S.done&&(Object.keys(S.loaded).forEach(function(C){P[C]||(P[C]={});var E=S.loaded[C];E.length&&E.forEach(function(D){P[C][D]===void 0&&(P[C][D]=!0)})}),S.done=!0,S.errors.length?S.callback(S.errors):S.callback())}),this.emit("loaded",P),this.queue=this.queue.filter(function(S){return!S.done})}},{key:"read",value:function(a,f,d){var m=this,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,P=arguments.length>5?arguments[5]:void 0;if(!a.length)return P(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:f,fcName:d,tried:g,wait:N,callback:P});return}this.readingCalls++;var S=function(V,R){if(m.readingCalls--,m.waitingReads.length>0){var L=m.waitingReads.shift();m.read(L.lng,L.ns,L.fcName,L.tried,L.wait,L.callback)}if(V&&R&&g2&&arguments[2]!==void 0?arguments[2]:{},g=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),g&&g();typeof a=="string"&&(a=this.languageUtils.toResolveHierarchy(a)),typeof f=="string"&&(f=[f]);var N=this.queueLoad(a,f,m,g);if(!N.toLoad.length)return N.pending.length||g(),null;N.toLoad.forEach(function(P){d.loadOne(P)})}},{key:"load",value:function(a,f,d){this.prepareLoading(a,f,{},d)}},{key:"reload",value:function(a,f,d){this.prepareLoading(a,f,{reload:!0},d)}},{key:"loadOne",value:function(a){var f=this,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",m=a.split("|"),g=m[0],N=m[1];this.read(g,N,"read",void 0,void 0,function(P,S){P&&f.logger.warn("".concat(d,"loading namespace ").concat(N," for language ").concat(g," failed"),P),!P&&S&&f.logger.log("".concat(d,"loaded namespace ").concat(N," for language ").concat(g),S),f.loaded(a,P,S)})}},{key:"saveMissing",value:function(a,f,d,m,g){var N=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},P=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(f)){this.logger.warn('did not save key "'.concat(d,'" as the namespace "').concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(d==null||d==="")){if(this.backend&&this.backend.create){var S=kf(kf({},N),{},{isUpdate:g}),C=this.backend.create.bind(this.backend);if(C.length<6)try{var E;C.length===5?E=C(a,f,d,m,S):E=C(a,f,d,m),E&&typeof E.then=="function"?E.then(function(D){return P(null,D)}).catch(P):P(null,E)}catch(D){P(D)}else C(a,f,d,m,P,S)}!a||!a[0]||this.store.addResource(a[0],f,d,m)}}}]),s}(jn);function Sf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(i){var s={};if(Xe(i[1])==="object"&&(s=i[1]),typeof i[1]=="string"&&(s.defaultValue=i[1]),typeof i[2]=="string"&&(s.tDescription=i[2]),Xe(i[2])==="object"||Xe(i[3])==="object"){var c=i[3]||i[2];Object.keys(c).forEach(function(a){s[a]=c[a]})}return s},interpolation:{escapeValue:!0,format:function(i,s,c,a){return i},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function xf(o){return typeof o.ns=="string"&&(o.ns=[o.ns]),typeof o.fallbackLng=="string"&&(o.fallbackLng=[o.fallbackLng]),typeof o.fallbackNS=="string"&&(o.fallbackNS=[o.fallbackNS]),o.supportedLngs&&o.supportedLngs.indexOf("cimode")<0&&(o.supportedLngs=o.supportedLngs.concat(["cimode"])),o}function Of(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);i&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),s.push.apply(s,c)}return s}function Wt(o){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eo(){}function Gh(o){var i=Object.getOwnPropertyNames(Object.getPrototypeOf(o));i.forEach(function(s){typeof o[s]=="function"&&(o[s]=o[s].bind(o))})}var To=function(o){Uo(s,o);var i=Kh(s);function s(){var c,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;if(bt(this,s),c=i.call(this),Do&&jn.call(En(c)),c.options=xf(a),c.services={},c.logger=Yt,c.modules={external:[]},Gh(En(c)),f&&!c.isInitialized&&!a.isClone){if(!c.options.initImmediate)return c.init(a,f),gi(c,En(c));setTimeout(function(){c.init(a,f)},0)}return c}return Mt(s,[{key:"init",value:function(){var a=this,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;typeof f=="function"&&(d=f,f={}),!f.defaultNS&&f.defaultNS!==!1&&f.ns&&(typeof f.ns=="string"?f.defaultNS=f.ns:f.ns.indexOf("translation")<0&&(f.defaultNS=f.ns[0]));var m=Sf();this.options=Wt(Wt(Wt({},m),this.options),xf(f)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Wt(Wt({},m.interpolation),this.options.interpolation)),f.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=f.keySeparator),f.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=f.nsSeparator);function g(L){return L?typeof L=="function"?new L:L:null}if(!this.options.isClone){this.modules.logger?Yt.init(g(this.modules.logger),this.options):Yt.init(null,this.options);var N;this.modules.formatter?N=this.modules.formatter:typeof Intl<"u"&&(N=Vh);var P=new mf(this.options);this.store=new jh(this.options.resources,this.options);var S=this.services;S.logger=Yt,S.resourceStore=this.store,S.languageUtils=P,S.pluralResolver=new Dh(P,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),N&&(!this.options.interpolation.format||this.options.interpolation.format===m.interpolation.format)&&(S.formatter=g(N),S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new Fh(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new Bh(g(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",function(L){for(var j=arguments.length,M=new Array(j>1?j-1:0),K=1;K1?j-1:0),K=1;K0&&C[0]!=="dev"&&(this.options.lng=C[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var E=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];E.forEach(function(L){a[L]=function(){var j;return(j=a.store)[L].apply(j,arguments)}});var D=["addResource","addResources","addResourceBundle","removeResourceBundle"];D.forEach(function(L){a[L]=function(){var j;return(j=a.store)[L].apply(j,arguments),a}});var V=hi(),R=function(){var j=function(K,Z){a.isInitialized&&!a.initializedStoreOnce&&a.logger.warn("init: i18next is already initialized. You should call init just once!"),a.isInitialized=!0,a.options.isClone||a.logger.log("initialized",a.options),a.emit("initialized",a.options),V.resolve(Z),d(K,Z)};if(a.languages&&a.options.compatibilityAPI!=="v1"&&!a.isInitialized)return j(null,a.t.bind(a));a.changeLanguage(a.options.lng,j)};return this.options.resources||!this.options.initImmediate?R():setTimeout(R,0),V}},{key:"loadResources",value:function(a){var f=this,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eo,m=d,g=typeof a=="string"?a:this.language;if(typeof a=="function"&&(m=a),!this.options.resources||this.options.partialBundledLanguages){if(g&&g.toLowerCase()==="cimode")return m();var N=[],P=function(E){if(E){var D=f.services.languageUtils.toResolveHierarchy(E);D.forEach(function(V){N.indexOf(V)<0&&N.push(V)})}};if(g)P(g);else{var S=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);S.forEach(function(C){return P(C)})}this.options.preload&&this.options.preload.forEach(function(C){return P(C)}),this.services.backendConnector.load(N,this.options.ns,function(C){!C&&!f.resolvedLanguage&&f.language&&f.setResolvedLanguage(f.language),m(C)})}else m(null)}},{key:"reloadResources",value:function(a,f,d){var m=hi();return a||(a=this.languages),f||(f=this.options.ns),d||(d=Eo),this.services.backendConnector.reload(a,f,function(g){m.resolve(),d(g)}),m}},{key:"use",value:function(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Yf.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}},{key:"setResolvedLanguage",value:function(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1))for(var f=0;f-1)&&this.store.hasLanguageSomeTranslations(d)){this.resolvedLanguage=d;break}}}},{key:"changeLanguage",value:function(a,f){var d=this;this.isLanguageChangingTo=a;var m=hi();this.emit("languageChanging",a);var g=function(C){d.language=C,d.languages=d.services.languageUtils.toResolveHierarchy(C),d.resolvedLanguage=void 0,d.setResolvedLanguage(C)},N=function(C,E){E?(g(E),d.translator.changeLanguage(E),d.isLanguageChangingTo=void 0,d.emit("languageChanged",E),d.logger.log("languageChanged",E)):d.isLanguageChangingTo=void 0,m.resolve(function(){return d.t.apply(d,arguments)}),f&&f(C,function(){return d.t.apply(d,arguments)})},P=function(C){!a&&!C&&d.services.languageDetector&&(C=[]);var E=typeof C=="string"?C:d.services.languageUtils.getBestMatchFromCodes(C);E&&(d.language||g(E),d.translator.language||d.translator.changeLanguage(E),d.services.languageDetector&&d.services.languageDetector.cacheUserLanguage&&d.services.languageDetector.cacheUserLanguage(E)),d.loadResources(E,function(D){N(D,E)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?P(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(P):this.services.languageDetector.detect(P):P(a),m}},{key:"getFixedT",value:function(a,f,d){var m=this,g=function N(P,S){var C;if(Xe(S)!=="object"){for(var E=arguments.length,D=new Array(E>2?E-2:0),V=2;V1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var m=this.resolvedLanguage||this.languages[0],g=this.options?this.options.fallbackLng:!1,N=this.languages[this.languages.length-1];if(m.toLowerCase()==="cimode")return!0;var P=function(E,D){var V=f.services.backendConnector.state["".concat(E,"|").concat(D)];return V===-1||V===2};if(d.precheck){var S=d.precheck(this,P);if(S!==void 0)return S}return!!(this.hasResourceBundle(m,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||P(m,a)&&(!g||P(N,a)))}},{key:"loadNamespaces",value:function(a,f){var d=this,m=hi();return this.options.ns?(typeof a=="string"&&(a=[a]),a.forEach(function(g){d.options.ns.indexOf(g)<0&&d.options.ns.push(g)}),this.loadResources(function(g){m.resolve(),f&&f(g)}),m):(f&&f(),Promise.resolve())}},{key:"loadLanguages",value:function(a,f){var d=hi();typeof a=="string"&&(a=[a]);var m=this.options.preload||[],g=a.filter(function(N){return m.indexOf(N)<0});return g.length?(this.options.preload=m.concat(g),this.loadResources(function(N){d.resolve(),f&&f(N)}),d):(f&&f(),Promise.resolve())}},{key:"dir",value:function(a){if(a||(a=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!a)return"rtl";var f=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],d=this.services&&this.services.languageUtils||new mf(Sf());return f.indexOf(d.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var a=this,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eo,m=Wt(Wt(Wt({},this.options),f),{isClone:!0}),g=new s(m);(f.debug!==void 0||f.prefix!==void 0)&&(g.logger=g.logger.clone(f));var N=["store","services","language"];return N.forEach(function(P){g[P]=a[P]}),g.services=Wt({},this.services),g.services.utils={hasLoadedNamespace:g.hasLoadedNamespace.bind(g)},g.translator=new hf(g.services,g.options),g.translator.on("*",function(P){for(var S=arguments.length,C=new Array(S>1?S-1:0),E=1;E0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new To(o,i)});var Ge=To.createInstance();Ge.createInstance=To.createInstance;Ge.createInstance;Ge.dir;Ge.init;Ge.loadResources;Ge.reloadResources;Ge.use;Ge.changeLanguage;Ge.getFixedT;Ge.t;Ge.exists;Ge.setDefaultNamespace;Ge.hasLoadedNamespace;Ge.loadNamespaces;Ge.loadLanguages;function Wh(o,i){if(o==null)return{};var s={};for(var c in o)if({}.hasOwnProperty.call(o,c)){if(i.indexOf(c)!==-1)continue;s[c]=o[c]}return s}function Zl(o,i){if(o==null)return{};var s,c,a=Wh(o,i);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(o);for(c=0;c<]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function _f(o){var i={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},s=o.match(/<\/?([^\s]+?)[/\s>]/);if(s&&(i.name=s[1],(Xh[s[1]]||o.charAt(o.length-2)==="/")&&(i.voidElement=!0),i.name.startsWith("!--"))){var c=o.indexOf("-->");return{type:"comment",comment:c!==-1?o.slice(4,c):""}}for(var a=new RegExp(Zh),f=null;(f=a.exec(o))!==null;)if(f[0].trim())if(f[1]){var d=f[1].trim(),m=[d,""];d.indexOf("=")>-1&&(m=d.split("=")),i.attrs[m[0]]=m[1],a.lastIndex--}else f[2]&&(i.attrs[f[2]]=f[3].trim().substring(1,f[3].length-1));return i}var qh=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,em=/^\s*$/,tm=Object.create(null);function Qf(o,i){switch(i.type){case"text":return o+i.content;case"tag":return o+="<"+i.name+(i.attrs?function(s){var c=[];for(var a in s)c.push(a+'="'+s[a]+'"');return c.length?" "+c.join(" "):""}(i.attrs):"")+(i.voidElement?"/>":">"),i.voidElement?o:o+i.children.reduce(Qf,"")+"";case"comment":return o+""}}var nm={parse:function(o,i){i||(i={}),i.components||(i.components=tm);var s,c=[],a=[],f=-1,d=!1;if(o.indexOf("<")!==0){var m=o.indexOf("<");c.push({type:"text",content:m===-1?o:o.substring(0,m)})}return o.replace(qh,function(g,N){if(d){if(g!=="")return;d=!1}var P,S=g.charAt(1)!=="/",C=g.startsWith("");return{type:"comment",comment:c!==-1?o.slice(4,c):""}}for(var a=new RegExp(Zh),f=null;(f=a.exec(o))!==null;)if(f[0].trim())if(f[1]){var d=f[1].trim(),m=[d,""];d.indexOf("=")>-1&&(m=d.split("=")),i.attrs[m[0]]=m[1],a.lastIndex--}else f[2]&&(i.attrs[f[2]]=f[3].trim().substring(1,f[3].length-1));return i}var qh=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,em=/^\s*$/,tm=Object.create(null);function Wf(o,i){switch(i.type){case"text":return o+i.content;case"tag":return o+="<"+i.name+(i.attrs?function(s){var c=[];for(var a in s)c.push(a+'="'+s[a]+'"');return c.length?" "+c.join(" "):""}(i.attrs):"")+(i.voidElement?"/>":">"),i.voidElement?o:o+i.children.reduce(Wf,"")+"";case"comment":return o+""}}var nm={parse:function(o,i){i||(i={}),i.components||(i.components=tm);var s,c=[],a=[],f=-1,d=!1;if(o.indexOf("<")!==0){var m=o.indexOf("<");c.push({type:"text",content:m===-1?o:o.substring(0,m)})}return o.replace(qh,function(g,C){if(d){if(g!=="")return;d=!1}var P,S=g.charAt(1)!=="/",E=g.startsWith("