Skip to content

Commit

Permalink
add download tiktoken
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda committed Sep 27, 2024
1 parent e359a42 commit 1fcf4b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/run_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
- name: Start services
run: make start-services

- name: Pre-download tiktoken files
run: |
poetry run python docs/scripts/download_tiktoken.py
- name: Prepare notebooks
run: |
if [ "${{ matrix.lib-version }}" = "development" ]; then
Expand Down
4 changes: 4 additions & 0 deletions docs/_scripts/download_tiktoken.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import tiktoken

# This will trigger the download and caching of the necessary files
encoding = tiktoken.encoding_for_model("gpt2")

0 comments on commit 1fcf4b2

Please sign in to comment.