"git@developer.sourcefind.cn:change/sglang.git" did not exist on "5973675bc30d7fc85d131b5c61ac4a2318b16fcf"
Commit a3fcecf9 authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

only set `main_gpu` if value > 0 is provided

parent df07e4a0
......@@ -339,11 +339,14 @@ func newLlama(model string, adapters []string, runners []ModelRunner, numLayers
"--model", model,
"--ctx-size", fmt.Sprintf("%d", opts.NumCtx),
"--batch-size", fmt.Sprintf("%d", opts.NumBatch),
"--main-gpu", fmt.Sprintf("%d", opts.MainGPU),
"--n-gpu-layers", fmt.Sprintf("%d", numGPU),
"--embedding",
}
if opts.MainGPU > 0 {
params = append(params, "--main-gpu", fmt.Sprintf("%d", opts.MainGPU))
}
if opts.RopeFrequencyBase > 0 {
params = append(params, "--rope-freq-base", fmt.Sprintf("%f", opts.RopeFrequencyBase))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment