-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (45 loc) · 1.77 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: build
on: push
jobs:
build:
runs-on: macos-14
steps:
- name: Install dependencies
run: |
npm install -g @frost-beta/huggingface
python -m pip install transformers
- name: Checkout
uses: actions/checkout@v4
- name: Test
run: |
yarn
yarn prepack
huggingface download --silent mlx-community/Llama-3.2-1B-Instruct-8bit
echo 'Who are you?' | yarn tsx src/chat.ts Llama-3.2-1B-Instruct-8bit
huggingface download --silent mlx-community/llava-1.5-7b-4bit
echo 'What is in the photo? <image:https://www.techno-edge.net/imgs/zoom/19711.jpg>' | yarn tsx src/chat.ts llava-1.5-7b-4bit --temperature=0
huggingface download --silent Qwen/Qwen2-0.5B
yarn tsx src/generate.ts --max-tokens=128 Qwen2-0.5B
huggingface download --silent google-t5/t5-small --hf --fix-tokenizer
yarn tsx src/generate.ts --max-tokens=128 t5-small 'translate English to German: As much as six inches of rain could fall in the New York City region through Monday morning, and officials warned of flooding along the coast.' --temperature=0
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get tag
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set package version
run: |
npm config set git-tag-version=false
npm version $VERSION
- name: Install deps
run: yarn
- name: Publish npm package
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
ignore-scripts: false