Skip to content

Commit

Permalink
fix tokenset size in jsctrl; fixes #47
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Feb 2, 2024
1 parent b396029 commit bb58408
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jsctrl/src/jsctrl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ impl<'js> Trace<'js> for TokenSet {
impl TokenSet {
#[qjs(constructor)]
pub fn new() -> TokenSet {
// TODO set the size
let mut inner = SimpleVob::new();
inner.resize(32000);
TokenSet { inner }
let trie = &mut GLOBAL_STATE.lock().unwrap().trie;
TokenSet {
inner: trie.alloc_token_set(),
}
}

#[qjs(get)]
Expand Down
5 changes: 5 additions & 0 deletions rllm-cuda/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ if [ "$1" = "--trace" ] ; then
shift
fi

if [ "$1" = "--trace-rt" ] ; then
R_LOG=info,rllm=trace,aicirt=trace
shift
fi

if [ "$1" = "--loop" ] ; then
LOOP=1
shift
Expand Down

0 comments on commit bb58408

Please sign in to comment.