Skip to content

Commit f3620e7

Browse files
authored
v2.0 (#119)
1 parent 7ed36c5 commit f3620e7

File tree

105 files changed

+382
-3739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+382
-3739
lines changed

.github/workflows/android-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: ~/Android/Sdk/platform-tools/adb shell pm uninstall ai.picovoice.picollm.testapp.test || true
4343

4444
- name: Download resource files
45-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
45+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
4646

4747
- name: Make Android dir
4848
run: ~/Android/Sdk/platform-tools/adb shell mkdir -p /sdcard/Android/data/ai.picovoice.picollm.testapp/files/external
@@ -101,7 +101,7 @@ jobs:
101101
run: ~/Android/Sdk/platform-tools/adb shell pm uninstall ai.picovoice.picollm.testapp.test || true
102102

103103
- name: Download resource files
104-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
104+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
105105

106106
- name: Make Android dir
107107
run: ~/Android/Sdk/platform-tools/adb shell mkdir -p /sdcard/Android/data/ai.picovoice.picollm.testapp/files/external

.github/workflows/c-demos.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,28 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
xpu: [ cpu ]
42-
make_file: [ "Unix Makefiles" ]
43-
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios ]
41+
device: [ best ]
42+
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-windows-arm64 ]
4443
include:
45-
- xpu: gpu
46-
machine: pv-linux
47-
make_file: "Unix Makefiles"
48-
- xpu: gpu
49-
machine: pv-windows
50-
make_file: "MinGW Makefiles"
51-
- xpu: cpu
52-
machine: pv-windows
53-
make_file: "MinGW Makefiles"
54-
- xpu: gpu
55-
machine: pv-windows-igpu
56-
make_file: "MinGW Makefiles"
57-
- xpu: cpu
58-
machine: pv-windows-arm64
59-
make_file: "MinGW Makefiles"
44+
- machine: rpi4-32
45+
make_file: "Unix Makefiles"
46+
- machine: rpi4-64
47+
make_file: "Unix Makefiles"
48+
- machine: rpi5-32
49+
make_file: "Unix Makefiles"
50+
- machine: rpi5-64
51+
make_file: "Unix Makefiles"
52+
- machine: pv-windows-arm64
53+
make_file: "MinGW Makefiles"
54+
- device: gpu
55+
machine: pv-linux
56+
make_file: "Unix Makefiles"
57+
- device: gpu
58+
machine: pv-windows
59+
make_file: "MinGW Makefiles"
60+
- device: gpu
61+
machine: pv-ios
62+
make_file: "Unix Makefiles"
6063

6164
steps:
6265
- uses: actions/checkout@v3
@@ -76,7 +79,7 @@ jobs:
7679
echo PATH=$PATH >> $GITHUB_ENV
7780
7881
- name: Download resource files
79-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
82+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
8083

8184
- name: Create build directory
8285
run: cmake -G "${{ matrix.make_file }}" -B ./build
@@ -88,4 +91,4 @@ jobs:
8891
run: python3 -m pip install -r test/requirements.txt
8992

9093
- name: Test
91-
run: python test/test_picollm_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.pllm ${{matrix.xpu}}
94+
run: python test/test_picollm_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.pllm ${{matrix.device}}

.github/workflows/dotnet-demos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
xpu: [ cpu ]
29+
device: [ cpu ]
3030
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows, pv-windows-arm64 ]
3131
include:
32-
- xpu: gpu
32+
- device: gpu
3333
machine: pv-linux
34-
- xpu: gpu
34+
- device: gpu
3535
machine: pv-windows
36-
- xpu: gpu
36+
- device: gpu
3737
machine: pv-windows-igpu
3838

3939
steps:
4040
- uses: actions/checkout@v3
4141

4242
- name: Download resource files
43-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
43+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
4444

4545
- name: Package restore
4646
run: dotnet restore
@@ -49,4 +49,4 @@ jobs:
4949
run: dotnet build -c CompletionDemo.Release
5050

5151
- name: Run completion demo
52-
run: dotnet run -c CompletionDemo.Release -- --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.xpu}}
52+
run: dotnet run -c CompletionDemo.Release -- --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.device}}

.github/workflows/dotnet.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,48 +35,33 @@ jobs:
3535
env:
3636
ACCESS_KEY: ${{secrets.PV_VALID_ACCESS_KEY}}
3737
MODEL_PATH: ../../../../phi2-290.pllm
38-
DEVICE: ${{matrix.xpu}}
38+
DEVICE: ${{matrix.device}}
3939

4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
xpu: [ cpu ]
44-
dotnet:
45-
- binding-framework: net8.0
46-
test-framework: net8.0
43+
device: [ cpu ]
4744
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows, pv-windows-arm64 ]
4845
include:
49-
- xpu: gpu
50-
dotnet:
51-
binding-framework: net8.0
52-
test-framework: net8.0
46+
- device: gpu
5347
machine: pv-windows
54-
- dotnet:
55-
binding-framework: netstandard2.0
56-
test-framework: netcoreapp2.1
57-
xpu: cpu
58-
machine: pv-windows
59-
- xpu: gpu
60-
dotnet:
61-
binding-framework: net8.0
62-
test-framework: net8.0
48+
- device: gpu
6349
machine: pv-linux
64-
- xpu: gpu
65-
dotnet:
66-
binding-framework: net8.0
67-
test-framework: net8.0
50+
- device: gpu
6851
machine: pv-windows-igpu
6952

7053

7154
steps:
7255
- uses: actions/checkout@v3
7356

7457
- name: Download resource files
75-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
58+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
7659
working-directory: binding/dotnet
7760

7861
- name: Build binding
79-
run: dotnet build PicoLLM/PicoLLM.csproj --framework ${{ matrix.dotnet.binding-framework }}
62+
run: dotnet build PicoLLM/PicoLLM.csproj
8063

8164
- name: Test
82-
run: dotnet test --framework ${{ matrix.dotnet.test-framework }} -v n
65+
run: dotnet test -v n
66+
env:
67+
DOTNET_ROLL_FORWARD: LatestMajor

.github/workflows/ios-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ jobs:
3232
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
3333
PicoLLMAppTestUITests/BaseTest.swift
3434

35+
- name: Inject Device
36+
run: sed -i '.bak' 's:{TESTING_DEVICE_HERE}:cpu\:1:'
37+
PicoLLMAppTestUITests/BaseTest.swift
38+
3539
- name: Inject Resource URL
36-
run: sed -i '.bak' 's?{TESTING_MODEL_URL_HERE}?http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm?'
40+
run: sed -i '.bak' 's?{TESTING_MODEL_URL_HERE}?http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm?'
3741
PicoLLMAppTestUITests/BaseTest.swift
3842

3943
- name: XCode Build

.github/workflows/nodejs-demos.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,24 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
xpu: [ cpu ]
32+
device: [ cpu ]
3333
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows, pv-windows-arm64 ]
3434
include:
35-
- xpu: gpu
35+
- device: gpu
3636
machine: pv-linux
37-
- xpu: gpu
37+
- device: gpu
3838
machine: pv-windows
39-
- xpu: gpu
39+
- device: gpu
4040
machine: pv-windows-igpu
4141

4242
steps:
4343
- uses: actions/checkout@v3
4444

45-
- name: Use Node.js ${{ matrix.node-version }}
46-
uses: actions/setup-node@v3
47-
with:
48-
node-version: ${{ matrix.node-version }}
49-
5045
- name: Install dependencies
5146
run: yarn install
5247

5348
- name: Download resource files
54-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
49+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
5550

5651
- name: Test
57-
run: yarn completion --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.xpu}}
52+
run: yarn completion --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.device}}

.github/workflows/nodejs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
xpu: [ "cpu" ]
34+
device: [ "cpu" ]
3535
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows, pv-windows-arm64 ]
3636
include:
37-
- xpu: gpu
37+
- device: gpu
3838
machine: pv-linux
39-
- xpu: gpu
39+
- device: gpu
4040
machine: pv-windows
41-
- xpu: gpu
41+
- device: gpu
4242
machine: pv-windows-igpu
4343

4444
steps:
@@ -48,7 +48,7 @@ jobs:
4848
run: yarn install
4949

5050
- name: Download resource files
51-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o test/phi2-290.pllm
51+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o test/phi2-290.pllm
5252

5353
- name: Test
54-
run: yarn test test/index.test.ts --access_key=${{secrets.PV_VALID_ACCESS_KEY}} --device=${{matrix.xpu}}
54+
run: yarn test test/index.test.ts --access_key=${{secrets.PV_VALID_ACCESS_KEY}} --device=${{matrix.device}}

.github/workflows/python-demos.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
xpu: [ cpu ]
29+
device: [ cpu ]
3030
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows, pv-windows-arm64 ]
3131
include:
32-
- xpu: gpu
32+
- device: gpu
3333
machine: pv-linux
34-
- xpu: gpu
34+
- device: gpu
3535
machine: pv-windows
36-
- xpu: gpu
36+
- device: gpu
3737
machine: pv-windows-igpu
3838
steps:
3939
- uses: actions/checkout@v3
@@ -52,11 +52,20 @@ jobs:
5252
.venv\Scripts\activate
5353
echo PATH=$PATH >> $GITHUB_ENV
5454
55+
# ************** REMOVE AFTER RELEASE ********************
56+
- name: Build binding
57+
run: |
58+
python3 -m pip install wheel setuptools
59+
python3 setup.py sdist bdist_wheel
60+
python3 -m pip install --force-reinstall dist/picollm-2.0.0-py3-none-any.whl
61+
working-directory: binding/python
62+
# ********************************************************
63+
5564
- name: Install Python dependencies
5665
run: python3 -m pip install -r requirements.txt --force-reinstall
5766

5867
- name: Download resource files
59-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
68+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
6069

6170
- name: Test
62-
run: python3 picollm_demo_completion.py --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.xpu}}
71+
run: python3 picollm_demo_completion.py --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.device}}

.github/workflows/python.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
xpu: [ "cpu" ]
37+
device: [ "cpu" ]
3838
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows, pv-windows-arm64 ]
3939
include:
40-
- xpu: gpu
40+
- device: gpu
4141
machine: pv-linux
42-
- xpu: gpu
42+
- device: gpu
4343
machine: pv-windows
44-
- xpu: gpu
44+
- device: gpu
4545
machine: pv-windows-igpu
4646
steps:
4747
- uses: actions/checkout@v3
@@ -64,7 +64,7 @@ jobs:
6464
run: python3 -m pip install -r binding/python/requirements.txt
6565

6666
- name: Download resource files
67-
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-fae87bc/phi2-290.pllm -o phi2-290.pllm
67+
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/05-f5a103d/phi2-290.pllm -o phi2-290.pllm
6868

6969
- name: Test
70-
run: python3 -m binding.python.test_picollm ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.pllm ${{matrix.xpu}}
70+
run: python3 -m binding.python.test_picollm ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.pllm ${{matrix.device}}

.github/workflows/web-codestyle.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ on:
55
push:
66
branches: [ main ]
77
paths:
8-
- '**/web/*.js'
9-
- '**/web/*.ts'
8+
- 'binding/web/*.js'
9+
- 'binding/web/*.ts'
1010
- '.github/workflows/web-codestyle.yml'
1111
pull_request:
1212
branches: [ main, 'v[0-9]+.[0-9]+' ]
1313
paths:
14-
- '**/web/*.js'
15-
- '**/web/*.ts'
14+
- 'binding/web/*.js'
15+
- 'binding/web/*.ts'
1616
- '.github/workflows/web-codestyle.yml'
1717

1818
jobs:
@@ -27,9 +27,6 @@ jobs:
2727
with:
2828
node-version: lts/*
2929

30-
- name: Pre-build dependencies
31-
run: npm install yarn
32-
3330
- name: Run Binding Linter
3431
run: yarn && yarn lint
3532
working-directory: binding/web

0 commit comments

Comments
 (0)