Skip to content

Commit

Permalink
Merge branch 'main' into r0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Feb 27, 2024
2 parents 752d2ed + eb1a848 commit 76b565b
Show file tree
Hide file tree
Showing 78 changed files with 2,246 additions and 623 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- '!*-dev'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}

# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

Expand All @@ -28,6 +28,15 @@ jobs:
# with sigstore/fulcio when running outside of PRs.
id-token: write

strategy:
matrix:
device-type: [cuda, rocm]
include:
- device-type: cuda
image-suffix: ''
- device-type: rocm
image-suffix: '-rocm'

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -69,8 +78,10 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Generate image name
env:
IMAGE_SUFFIX: ${{ matrix.image-suffix }}
run: |
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}${IMAGE_SUFFIX}" >>${GITHUB_ENV}
- uses: int128/docker-build-cache-config-action@v1
id: cache
Expand Down Expand Up @@ -98,7 +109,7 @@ jobs:
id: build-and-push
uses: docker/[email protected]
with:
file: Dockerfile
file: docker/Dockerfile.${{ matrix.device-type }}
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -113,4 +124,3 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: tabbyml/tabby

8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ jobs:
container: ${{ matrix.container }}
strategy:
matrix:
binary: [aarch64-apple-darwin, x86_64-manylinux2014, x86_64-windows-msvc, x86_64-manylinux2014-cuda117, x86_64-manylinux2014-cuda122, x86_64-windows-msvc-cuda117, x86_64-windows-msvc-cuda122, x86_64-manylinux2014-rocm57]
binary: [aarch64-apple-darwin, x86_64-manylinux2014, x86_64-windows-msvc, x86_64-manylinux2014-cuda117, x86_64-manylinux2014-cuda122, x86_64-windows-msvc-cuda117, x86_64-windows-msvc-cuda122]
include:
- os: macos-latest
target: aarch64-apple-darwin
binary: aarch64-apple-darwin
build_args: --features prod-db
- os: dimerun-k3-ubuntu2204
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014
Expand Down Expand Up @@ -63,11 +64,6 @@ jobs:
ext: .exe
build_args: --features cuda,prod-db
windows_cuda: '12.2.0'
- os: dimerun-k3-ubuntu2204
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014-rocm57
container: ghcr.io/cromefire/hipblas-manylinux/2014/5.7:latest
build_args: --features static-ssl,rocm,prod-db

env:
SCCACHE_GHA_ENABLED: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
cancel-in-progress: true

env:
RUST_TOOLCHAIN: 1.73.0
RUST_TOOLCHAIN: 1.76.0

jobs:
tests:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
.idea/
.DS_Store
.vscode/
local/
__pycache__
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,22 @@ apt-get install protobuf-compiler libopenblas-dev
choco install protoc
```

Some of the tests require mailtutan SMTP server which you can install with:

```bash
cargo install mailtutan
```

Before proceeding, ensure that all tests are passing locally:

```
cargo test -- --skip golden
```

Golden tests should be skipped on all platforms except Apple silicon (M1/M2), because they have not been created for other platforms yet.

This will help ensure everything is working correctly and avoid surprises with local breakages.

Golden tests, which run models and check their outputs against previous "golden snapshots", should be skipped for most development purposes, as they take a very long time to run (especially the tests running the models on CPU). You may still want to run them if your changes relate to the functioning of or integration with the generative models, but skipping them is recommended otherwise.

## Building and Running

Tabby can be run through `cargo` in much the same manner as docker:
Expand Down Expand Up @@ -78,6 +84,7 @@ By default, Tabby will start on `localhost:8080` and serve requests.
Tabby is broken up into several crates, each responsible for a different part of the functionality. These crates fall into two categories: Fully open source features, and enterprise features. All open-source feature crates are located in the `/crates` folder in the repository root, and all enterprise feature crates are located in `/ee`.

### Crates

- `crates/tabby` - The core tabby application, this is the main binary crate defining CLI behavior and driving the API
- `crates/tabby-common` - Interfaces and type definitions shared across most other tabby crates, especially types used for serialization
- `crates/tabby-download` - Very small crate, responsible for downloading models at runtime
Expand Down
167 changes: 162 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fix:
cargo machete --fix || true
cargo +nightly fmt
cargo +nightly clippy --fix --allow-dirty --allow-staged
cargo clippy --fix --allow-dirty --allow-staged

fix-ui:
cd ee/tabby-ui && yarn format:write && yarn lint:fix
Expand Down
Loading

0 comments on commit 76b565b

Please sign in to comment.