Add support for the Llama 3.1 70B Instruct model to facilitate testing on high‑performance accelerators.

This commit is contained in:
Foke Singh 2023-04-19 10:23:44 +00:00
parent fdb7da5c9b
commit 837f8fb111
2 changed files with 41 additions and 0 deletions

View File

@ -102,6 +102,30 @@ filegroup(
) )
use_repo(huggingface, "Meta-Llama-3.1-8B-Instruct") use_repo(huggingface, "Meta-Llama-3.1-8B-Instruct")
huggingface.model(
name = "Meta-Llama-3.1-70B-Instruct",
build_file_content = """\
package(default_visibility = ["//visibility:public"])
filegroup(
name = "model",
srcs = glob(["*.safetensors"]) + ["model.safetensors.index.json"],
)
filegroup(
name = "tokenizer",
srcs = ["tokenizer.json"],
)
""",
commit = "945c8663693130f8be2ee66210e062158b2a9693",
includes = [
"*.safetensors",
"model.safetensors.index.json",
"tokenizer.json",
],
model = "meta-llama/Meta-Llama-3.1-70B-Instruct",
)
use_repo(huggingface, "Meta-Llama-3.1-70B-Instruct")
huggingface.model( huggingface.model(
name = "TinyLlama-1.1B-Chat-v1.0", name = "TinyLlama-1.1B-Chat-v1.0",
build_file_content = """\ build_file_content = """\

View File

@ -34,6 +34,23 @@ native_binary(
], ],
) )
native_binary(
name = "Llama-3.1-70B-Instruct",
src = ":llama",
args = [
"--model=$(location @Meta-Llama-3.1-70B-Instruct//:model.safetensors.index.json)",
"--tokenizer=$(location @Meta-Llama-3.1-70B-Instruct//:tokenizer)",
"--num-heads=64",
"--num-kv-heads=8",
"--rope-freq-base=500000",
],
data = [
"@Meta-Llama-3.1-70B-Instruct//:model",
"@Meta-Llama-3.1-70B-Instruct//:model.safetensors.index.json",
"@Meta-Llama-3.1-70B-Instruct//:tokenizer",
],
)
native_binary( native_binary(
name = "OpenLLaMA-3B", name = "OpenLLaMA-3B",
src = ":llama", src = ":llama",