Skip to content

Commit aa7d750

Browse files
committed
Update instrumentation test docs
CI won't test this due to OOM. Now we rely on local instrumentation test.
1 parent 4ea6839 commit aa7d750

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
set -eu
9+
10+
BASEDIR=$(dirname "$0")
11+
pushd "$BASEDIR"/../../../../
12+
curl -C - -Ls "https://huggingface.co/karpathy/tinyllamas/resolve/main/stories110M.pt" --output stories110M.pt
13+
curl -C - -Ls "https://raw.githubusercontent.com/karpathy/llama2.c/master/tokenizer.model" --output tokenizer.model
14+
# Create params.json file
15+
touch params.json
16+
echo '{"dim": 768, "multiple_of": 32, "n_heads": 12, "n_layers": 12, "norm_eps": 1e-05, "vocab_size": 32000}' > params.json
17+
python -m examples.models.llama.export_llama -c stories110M.pt -p params.json -d fp16 -n stories110m_h.pte -kv
18+
python -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
19+
20+
adb mkdir -p /data/local/tmp/llama
21+
adb push stories110m_h.pte /data/local/tmp/llama
22+
adb push tokenizer.bin /data/local/tmp/llama
23+
popd
24+
25+
pushd "$BASEDIR"
26+
./gradlew connectedAndroidTest
27+
popd
28+

0 commit comments

Comments
 (0)