Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS] Add GenAI Node.js bindings #1193

Open
wants to merge 67 commits into
base: master
Choose a base branch
from

Conversation

vishniakov-nikolai
Copy link

@vishniakov-nikolai vishniakov-nikolai commented Nov 11, 2024

Adding Node.js bindings for GenAI pipelines.

  • 155187
  • 158132

Limitations

Current version it's primary backbone of future development. Supports bindings of LLMPipeline only.

TODO

  • Test build configuration
  • Integrate unit tests run into GHA
  • Add script to download runtime binaries (after binaries publication)

@github-actions github-actions bot added category: sampling Sampling / Decoding algorithms category: cmake / build Cmake scripts category: samples GenAI samples labels Nov 11, 2024
@ilya-lavrenov ilya-lavrenov removed the category: sampling Sampling / Decoding algorithms label Nov 20, 2024
@github-actions github-actions bot added the category: tokenizers Tokenizer class or submodule update label Nov 20, 2024
@vishniakov-nikolai vishniakov-nikolai marked this pull request as ready for review November 25, 2024 10:58
@github-actions github-actions bot added category: llm_bench Label for tool/llm_bench folder category: GHA CI based on Github actions labels Nov 26, 2024
src/js/README.md Outdated Show resolved Hide resolved
.github/workflows/linux.yml Outdated Show resolved Hide resolved
samples/js/chat_sample/README.md Show resolved Hide resolved
.github/workflows/linux.yml Show resolved Hide resolved
vishniakov-nikolai and others added 4 commits January 7, 2025 10:59
Co-authored-by: Vladimir Zlobin <vladimir.zlobin@intel.com>
Co-authored-by: Vladimir Zlobin <vladimir.zlobin@intel.com>
Co-authored-by: Vladimir Zlobin <vladimir.zlobin@intel.com>
src/js/README.md Outdated Show resolved Hide resolved
@Wovchena
Copy link
Collaborator

Wovchena commented Jan 8, 2025

#1193 (comment) and #1193 (comment) are left

@Wovchena Wovchena requested review from ilya-lavrenov and removed request for ilya-lavrenov January 8, 2025 08:25

- name: Install build dependencies
run: |
sudo -E ${OPENVINO_REPO}/install_build_dependencies.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for other jobs in this file we re-use docker images from OpenVINO repo.

restore-keys: |
${{ runner.os }}-${{ runner.arch }}-ccache-ov-and-genai-${{ matrix.build-type }}

- name: Build openvino + genai
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to build them together?
As you can see, we use OpenVINO provider github actions above. So, we don't build OpenVINO anymore here.

path: ${{ env.BUILD_DIR }}/genai_nodejs_bindings.tar.gz
if-no-files-found: 'error'

genai_nodejs_samples_tests:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we perform samples tests within a single JS related job which builds GenAI JS and performs all the tests ?

- name: Run tests
run: npm test
env:
MODEL_PATH: ${{ env.JS_SRC_DIR }}/tests/models/Llama-3.2-3B-Instruct-openvino-8bit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's very heavy model for tests. Please, use something like katuni4ka/tiny-random-baichuan2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, rename chat_sample folder to text_generation.

See #1411 where we move all samples from the same category to a single folder.

INCLUDES DESTINATION runtime/include)

# samples do not need to be built for NPM package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

samples => development files

@@ -133,13 +133,29 @@ if(MSVC OR APPLE)
set(ARCH_DIR ${ARCH_DIR}/${CMAKE_BUILD_TYPE})
endif()

# Put binaries at the top level for NPM package
if(CPACK_GENERATOR STREQUAL "NPM")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like if we follow @Wovchena we will not break anything for GenAI specifically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants