forked from pytorch/ao
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new gguf parsing for Q40 that conforms with pytorch's quantization stack * updates * add q6_k and clean up q40 * cleanup * fix bugs in q6k. Refactor code * clean up gguf stuff + add test * fix gguf CI test * change to mac * add pre torch
- Loading branch information
Showing
5 changed files
with
322 additions
and
230 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,49 @@ | ||
name: Compile main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
gguf-load-test: | ||
strategy: | ||
matrix: | ||
runner: [macos-14] | ||
runs-on: ${{matrix.runner}} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
- name: Print machine info | ||
run: | | ||
uname -a | ||
if [ $(uname -s) == Darwin ]; then | ||
sysctl machdep.cpu.brand_string | ||
sysctl machdep.cpu.core_count | ||
fi | ||
- name: Install requirements | ||
run: | | ||
echo "Intalling pip packages" | ||
pip install gguf | ||
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | ||
pip install -r requirements.txt | ||
- name: Download GGUF files | ||
run: | | ||
mkdir gguf_files | ||
wget -O gguf_files/llama-2-7b.Q4_0.gguf "https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_0.gguf?download=true" | ||
- name: Load files | ||
run: | | ||
touch test.py | ||
echo "from gguf_loader import load_llama_from_gguf_file" >> test.py | ||
echo "pt = load_llama_from_gguf_file(\"gguf_files/llama-2-7b.Q4_0.gguf\")" >> test.py | ||
cat test.py | ||
python test.py | ||
echo "Tests complete." |
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.