fix(mllama): sync backend between batches

This commit is contained in:
Michael Yang
2024-11-13 14:12:30 -08:00
parent c2e8cbaa14
commit 5b3393b6a2
2 changed files with 11 additions and 0 deletions

View File

@@ -598,6 +598,10 @@ func (c *Context) SetCrossAttention(state bool) {
C.llama_set_cross_attention(c.c, C.bool(state))
}
func (c *Context) Synchronize() {
C.llama_synchronize(c.c)
}
// sampling
// TODO: this is a temporary wrapper to allow calling C++ code from CGo
type SamplingContext struct {