mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-14 17:57:06 +00:00
only set main_gpu if value > 0 is provided
This commit is contained in:
@@ -339,11 +339,14 @@ func newLlama(model string, adapters []string, runners []ModelRunner, numLayers
|
|||||||
"--model", model,
|
"--model", model,
|
||||||
"--ctx-size", fmt.Sprintf("%d", opts.NumCtx),
|
"--ctx-size", fmt.Sprintf("%d", opts.NumCtx),
|
||||||
"--batch-size", fmt.Sprintf("%d", opts.NumBatch),
|
"--batch-size", fmt.Sprintf("%d", opts.NumBatch),
|
||||||
"--main-gpu", fmt.Sprintf("%d", opts.MainGPU),
|
|
||||||
"--n-gpu-layers", fmt.Sprintf("%d", numGPU),
|
"--n-gpu-layers", fmt.Sprintf("%d", numGPU),
|
||||||
"--embedding",
|
"--embedding",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if opts.MainGPU > 0 {
|
||||||
|
params = append(params, "--main-gpu", fmt.Sprintf("%d", opts.MainGPU))
|
||||||
|
}
|
||||||
|
|
||||||
if opts.RopeFrequencyBase > 0 {
|
if opts.RopeFrequencyBase > 0 {
|
||||||
params = append(params, "--rope-freq-base", fmt.Sprintf("%f", opts.RopeFrequencyBase))
|
params = append(params, "--rope-freq-base", fmt.Sprintf("%f", opts.RopeFrequencyBase))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user