-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/llamafile: adding llamafile as engine & ModelFactory mechanism r…
…ewrite suggestion & haystack parsing/write enchancements (#10) * llamafile & modelfactory removal suggestion & haystack parsing * revert flow_judge.py and haystack.py & make eval_data_types closer to original * revert haystack notebook & first edits for vllm and hf; combine vllm sync & async * model configs into engine files; model types and base into common * changed imports from modelfactory to direct init * harmonized the configs and provided structure where they are extended classes, and can take sensible args * updated notebooks to load the models using the new init * added import checks for the extras and reverted eval_data_types parsing * Create python-package.yml * ruff format & isort run * ruff format & isort run & test [dev,vllm,hf,llamafile] * updated readme & added tests readme with icicle viz * updated codecov action * added test results upload to codecov * upgrade actions setup-python to v5 * update youtube badge * test codecov badge * python versions badge * rm py versions badge * clean up a misplaced title * realign * chore: update readme * init fix for extras * chore: executed notebooks + minor update * standardized genparams & non-supported model warning & llamafile quant kv + fa * add torch to llamafile extra as dep * add gpu check into ci flow * fixed tests README * fixed redundant vllm import error * fixed model to model_id in vllm and llamafile * fixed llamafile args quoting * fixed metadata file writing to json from jsonl * fixed default model name for Llamafile & tests graph to starburst * small fix in the readme from old usage of Flow-Judge-v0.1_HF to Hf() * testing out llamafile server cleanup from abrupt situations * fixed gen params passing for vllm and hf init * change vllm default param dtype back to bfloat16 from auto --------- Co-authored-by: Bernardo Garcia <bernardo@flow-ai.com>
- Loading branch information
Showing
25 changed files
with
2,461 additions
and
1,121 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ "main", "feat/llamafile" ] | ||
pull_request: | ||
branches: [ "main", "feat/llamafile" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[dev,vllm,hf,llamafile] | ||
- name: Verify GPU availability | ||
run: | | ||
nvidia-smi | ||
python -c "import torch; print(torch.cuda.is_available())" | ||
- name: Lint with ruff | ||
run: | | ||
ruff check . || true | ||
- name: Format with black | ||
run: | | ||
black --check --diff . || true | ||
- name: Sort imports with isort | ||
run: | | ||
isort --check-only --diff . || true | ||
- name: Test with pytest and generate coverage | ||
run: | | ||
pytest --cov=./ --junitxml=junit.xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,8 @@ output/ | |
|
||
# data | ||
data/ | ||
|
||
.cache | ||
|
||
flake.nix | ||
flake.lock |
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
Oops, something went wrong.