// this is the error returned from the llama runner process that failed most recently
// this is the error returned from the llama runner process that failed most recently
// falcon and starcoder model families are not compatible with older versions of llama.cpp
families:=[]string{"falcon","starcoder"}
ifstrings.Contains(runnerErr.Error(),"failed to load model")&&slices.Contains(families,ggml.ModelFamily()){
returnnil,fmt.Errorf("%v: %s",runnerErr,"this model may be incompatible with your version of Ollama. Please run `ollama pull` to get the latest version of this model.")
// some older models are not compatible with newer versions of llama.cpp
// show a generalized compatibility error until there is a better way to
// check for model compatibility
ifstrings.Contains(err.Error(),"failed to load model"){
err=fmt.Errorf("%v: this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running `ollama pull %s`",err,model.ShortName)