Work with t5's tokenizer #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
build: | |
runs-on: macos-14 | |
steps: | |
- name: Install dependencies | |
run: npm install -g @frost-beta/huggingface | |
- 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 | |
huggingface download --silent Xenova/t5-small --hf # fix tokenizer | |
yarn tsx src/generate.ts --temperature=0 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.' | |
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 |