Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a2e69c

Browse filesBrowse files
fraxy-vtybalex
authored andcommitted
convert-llama2c-to-ggml : enable conversion of GQA models (ggml-org#6237)
* convert-llama2c-to-ggml: enable conversion of multiqueries, ggml-org#5608 * add test in build action * Update build.yml * Update build.yml * Update build.yml * gg patch
1 parent 49270d8 commit 6a2e69c
Copy full SHA for 6a2e69c

File tree

Expand file treeCollapse file tree

3 files changed

+194
-208
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+194
-208
lines changed

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,17 @@ jobs:
225225
cd build
226226
ctest -L main --verbose --timeout 900
227227
228+
- name: Test llama2c conversion
229+
id: llama2c_test
230+
run: |
231+
cd build
232+
echo "Fetch tokenizer"
233+
wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/tok512.bin
234+
echo "Fetch llama2c model"
235+
wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
236+
./bin/convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
237+
./bin/main -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
238+
228239
# ubuntu-latest-cmake-sanitizer:
229240
# runs-on: ubuntu-latest
230241
#

‎examples/convert-llama2c-to-ggml/README.md

Copy file name to clipboardExpand all lines: examples/convert-llama2c-to-ggml/README.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ An example command using a model from [karpathy/tinyllamas](https://huggingface.
2121

2222
`$ ./convert-llama2c-to-ggml --copy-vocab-from-model llama-2-7b-chat.gguf.q2_K.bin --llama2c-model stories42M.bin --llama2c-output-model stories42M.gguf.bin`
2323

24+
Note: The vocabulary for `stories260K.bin` should be its own tokenizer `tok512.bin` found in [karpathy/tinyllamas/stories260K](https://huggingface.co/karpathy/tinyllamas/tree/main/stories260K).
25+
2426
Now you can use the model with a command like:
2527

2628
`$ ./main -m stories42M.gguf.bin -p "One day, Lily met a Shoggoth" -n 500 -c 256`

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.