KoboldAI-Client icon indicating copy to clipboard operation
KoboldAI-Client copied to clipboard

Option to allow lines starting with tabs or spaces for Python code generation

Open TiagoTiago opened this issue 3 years ago • 4 comments

To some extent it seems GPT-J 6B might be useful to assist with writing code in many languages; but with Python, tabs and spaces at the beginning of lines matter, and unfortunately, the way it works now, it seems all such characters get disappeared when either the user or the transformer tries to put them there.

It would be good if there was an option to disable such forced formatting/editing, to allow for things like Python code to be input and output intact.

TiagoTiago avatar May 21 '22 19:05 TiagoTiago

Here's a branch for you to try: https://github.com/VE-FORBRYDERNE/KoboldAI/tree/whitespace

vfbd avatar May 26 '22 18:05 vfbd

Here's a branch for you to try: https://github.com/VE-FORBRYDERNE/KoboldAI/tree/whitespace

Hm, looks like this fork doesn't pay attention to the path the server is launched from; it is redownloading the model where the script is instead going with the model I had already downloaded on a separate drive...

TiagoTiago avatar May 26 '22 19:05 TiagoTiago

I haven't tried the generated script yet; but it looks like so far it might indeed be respecting white spaces.

TiagoTiago avatar May 26 '22 19:05 TiagoTiago

Hm, seems to be a bit buggy; sometimes it eats spaces as I type, or refuses to delete spaces, or make them appear where they shouldn't when editing. I haven't figured out a consistent way to repro yet though.

If it helps, I'm using Firefox, under Linux Mint.

TiagoTiago avatar May 26 '22 20:05 TiagoTiago