2.0.0
Browse files
gen_models--meta-llama--Llama-3.2-3B-Instruct.sh
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#**************************************************************************
|
| 3 |
+
#|| SiMa.ai CONFIDENTIAL ||
|
| 4 |
+
#|| Unpublished Copyright (c) 2025 SiMa.ai, All Rights Reserved. ||
|
| 5 |
+
#**************************************************************************
|
| 6 |
+
# NOTICE: All information contained herein is, and remains the property of
|
| 7 |
+
# SiMa.ai. The intellectual and technical concepts contained herein are
|
| 8 |
+
# proprietary to SiMa and may be covered by U.S. and Foreign Patents,
|
| 9 |
+
# patents in process, and are protected by trade secret or copyright law.
|
| 10 |
+
#
|
| 11 |
+
# Dissemination of this information or reproduction of this material is
|
| 12 |
+
# strictly forbidden unless prior written permission is obtained from
|
| 13 |
+
# SiMa.ai. Access to the source code contained herein is hereby forbidden
|
| 14 |
+
# to anyone except current SiMa.ai employees, managers or contractors who
|
| 15 |
+
# have executed Confidentiality and Non-disclosure agreements explicitly
|
| 16 |
+
# covering such access.
|
| 17 |
+
#
|
| 18 |
+
# The copyright notice above does not evidence any actual or intended
|
| 19 |
+
# publication or disclosure of this source code, which includes information
|
| 20 |
+
# that is confidential and/or proprietary, and is a trade secret, of SiMa.ai.
|
| 21 |
+
#
|
| 22 |
+
# ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, OR PUBLIC
|
| 23 |
+
# DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN
|
| 24 |
+
# CONSENT OF SiMa.ai IS STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE
|
| 25 |
+
# LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE
|
| 26 |
+
# CODE AND/OR RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO
|
| 27 |
+
# REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR
|
| 28 |
+
# SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART.
|
| 29 |
+
#
|
| 30 |
+
#**************************************************************************
|
| 31 |
+
|
| 32 |
+
# Download the HuggingFace meta-llama/Llama-3.2-3B-Instruct using the following command.
|
| 33 |
+
# huggingface-cli download meta-llama/Llama-3.2-3B-Instruct
|
| 34 |
+
|
| 35 |
+
TMPDIR=$(mktemp -d /tmp/sima.XXXXXX)
|
| 36 |
+
|
| 37 |
+
function cleanup () {
|
| 38 |
+
rm -r ${TMPDIR}
|
| 39 |
+
}
|
| 40 |
+
trap cleanup EXIT
|
| 41 |
+
|
| 42 |
+
cat >${TMPDIR}/config.py <<'EOF'
|
| 43 |
+
def get_layer_configuration(model_properties, layer):
|
| 44 |
+
if layer["is_group"]:
|
| 45 |
+
precision = "A_BF16_W_INT8"
|
| 46 |
+
else:
|
| 47 |
+
precision = "A_BF16_W_INT4"
|
| 48 |
+
return {"precision": precision}
|
| 49 |
+
EOF
|
| 50 |
+
|
| 51 |
+
llima-compile -c ${TMPDIR}/config.py --max_num_tokens 2048 $@
|