Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and fix name of llama tests #1020

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 14 additions & 26 deletions tests/pytorch/nightly/llama2-model.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,24 @@ local tpus = import 'templates/tpus.libsonnet';
local utils = import 'templates/utils.libsonnet';

{
local llama2_inference = self.llama2_inference,
llama2_inference:: common.PyTorchTest {
local config = self,
modelName: 'llama2-i',
local llama2 = self.llama2,
llama2:: common.PyTorchTest {
modelName: 'llama2',
paramsOverride:: {
scriptPath: 'llama/7B/llama2inference.sh',
trainCommand: [
'bash',
self.scriptPath,
],
},
command: self.paramsOverride.trainCommand,
},
local llama2_training = self.llama2_training,
llama2_training:: common.PyTorchTest {
local config = self,
modelName: 'llama2-t',
paramsOverride:: {
scriptPath: 'transformers/7B/llama2training.sh',
trainCommand: [
'bash',
self.scriptPath,
],
},
command: self.paramsOverride.trainCommand,
},
local pjrt = self.pjrt,
pjrt:: common.PyTorchTpuVmMixin {
modelName: 'llama2-pjrt',
},

local infer = self.infer,
infer:: common.PyTorchTpuVmMixin + pjrt {
infer:: common.Functional + common.PyTorchTpuVmMixin {
modelName+: '-infer',
paramsOverride+:: {
scriptPath: 'llama/7B/llama2inference.sh',
},
tpuSettings+: {
tpuVmExtraSetup: |||
# install tokenizer model
Expand Down Expand Up @@ -85,8 +70,11 @@ local utils = import 'templates/utils.libsonnet';
},
},
local spmd = self.spmd,
spmd:: common.PyTorchTpuVmMixin + pjrt {
spmd:: common.Functional + common.PyTorchTpuVmMixin {
modelName+: '-train-spmd',
paramsOverride+:: {
scriptPath: 'transformers/7B/llama2training.sh',
},
tpuSettings+: {
tpuVmExports+: |||
export XLA_USE_BF16=1
Expand Down Expand Up @@ -137,7 +125,7 @@ local utils = import 'templates/utils.libsonnet';
},

configs: [
llama2_inference + v4_8 + common.Functional + timeouts.Hours(3) + infer,
llama2_training + v4_8 + common.Functional + timeouts.Hours(3) + spmd,
llama2 + v4_8 + infer + timeouts.Hours(3),
llama2 + v4_8 + spmd + timeouts.Hours(3),
],
}
Loading