Skip to content

CuBLAS gives the same output every time #265

Open
@runarheggset

Description

@runarheggset

Running the following code with CuBLAS returns the same output every time it's run. Running without CuBLAS returns a different generation, as expected.

package main

import (
	"log"

	"github.com/go-skynet/go-llama.cpp"
)

func main() {
	model := "../models/airoboros-l2-13b-3.1.Q4_K_M.gguf"

	l, err := llama.New(model)
	if err != nil {
		panic(err)
	}
	defer l.Free()

	opts := []llama.PredictOption{
		llama.SetTokens(500),
		llama.SetThreads(20),
		llama.SetTopK(20),
		llama.SetTopP(0.9),
		llama.SetTemperature(0.7),
		llama.SetPenalty(1.15),
	}

	prompt := "Hello"

	text, err := l.Predict(prompt, opts...)
	if err != nil {
		panic(err)
	}

	log.Print(text)
}

Output with CuBLAS:
, I'm interested in 10000 W 127th St, Palos Park, IL 60465. Please send me more information about this property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions