You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fix][Grammar] Detach token table to prevent disposing it (#571)
Prior to this PR, when reusing the same engine but for different schema
will run into error "Module has already been disposed". An example to
reproduce this is included in
#560.
This is because `this.tokenTable` is a `tvmjs.TVMObject` and will be
disposed after the scope ends.
We fix this by wrapping the call with
`this.tvm.detachFromCurrentScope()`, and only dispose `this.tokenTable`
when we dispose the entire `LLMChatPipeline`.
Co-authored-by: SMarioMan <[email protected]>
0 commit comments