smallcloudai / refact-vscode

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for VS Code
https://refact.ai
BSD 3-Clause "New" or "Revised" License
61 stars 19 forks source link

Failed To Load Tokenizer: EOF #69

Closed artforlife closed 5 months ago

artforlife commented 7 months ago

I have installed Refact as a self-hosted instance. It mostly appears to work, but there is an issue. When using the model combination below and typing code, the VS Code plugin returns the following error

failed to load tokenizer: EOF while parsing a value at line 1 column 0

Upon inspecting the logs, one can discover that this happens because instead of getting a tokenizer file with JSON in it, the file is empty or does not exist. For instance, for the model named StarCoder and for the VSCodium web version, the following file would be missing

/home/coder/.cache/refact/tokenizers/starcoder/15b/plus/tokenizer.json

That is, it appears that the Refact plugin is somehow not loading the tokenizers correctly. Whenever the file is added manually, requests begin working without error.

Screenshot 2023-12-05 at 16 39 28
olegklimov commented 7 months ago

We've seen something like this before. But I thought it was fixed, with a change that adds .flush() when downloading a tokenizer file.

mitya52 commented 7 months ago

@artforlife we need your plugin version, this should be be fixed in the latest one

hazratisulton commented 5 months ago