Skip to content

Commit

Permalink
add short delay before exit gui
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Apr 28, 2023
1 parent e97c709 commit f75de52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ def guilaunch():

if launchclicked==False:
print("Exiting by user request.")
time.sleep(2)
sys.exit()

#load all the vars
Expand Down

11 comments on commit f75de52

@rabidcopy
Copy link

@rabidcopy rabidcopy commented on f75de52 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit specifically breaks CLBlast for me. It just segfaults upon trying to initialize CLBlast and generating text.
python koboldcpp.py '../ggml-pythia-160m-deduped-q4_3.bin' --threads 6 --stream --smartcontext --useclblast 0 0

Processing Prompt [BLAS] (256 / 580 tokens)
Initializing CLBlast (First Run)...
Attempting to use: Platform=0, Device=0 (If invalid, program will crash)
Segmentation fault (core dumped)

Does not effect e97c709.
python koboldcpp.py '../ggml-pythia-160m-deduped-q4_3.bin' --threads 6 --stream --smartcontext --useclblast 0 0

Processing Prompt [BLAS] (256 / 580 tokens)
Initializing CLBlast (First Run)...
Attempting to use: Platform=0, Device=0 (If invalid, program will crash)
Using Platform: AMD Accelerated Parallel Processing Device: Ellesmere
Processing Prompt [BLAS] (580 / 580 tokens)
Generating (8 / 8 tokens)

Honestly it doesn't make sense. Commenting out the added line doesn't fix it.

Edit: Even stranger, if I browse the files of this commit and download those files instead of the latest files, it works.
https://github.com/LostRuins/koboldcpp/archive/refs/heads/concedo.zip Seg faults.
https://github.com/LostRuins/koboldcpp/archive/f75de52b25b9e4ae8acb7c751521d624ff360e87.zip Works fine.
git clone https://github.com/LostRuins/koboldcpp Seg faults.

@LostRuins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is very strange. Nothing in this update should have affected CLBlast at all

@LostRuins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you compare the files in your checkout repo vs the zip? any difference?

@LostRuins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes zero sense. All that this commit has changed is adding one line of sleep function. Commenting it does nothing?

@rabidcopy
Copy link

@rabidcopy rabidcopy commented on f75de52 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I tried getting rid of that line, and if I git clone and checkout the commit before this, it seg faults. The only way I don't get a segfault is to download the files for the commit from the permalink at that point of history in the repo.

@rabidcopy
Copy link

@rabidcopy rabidcopy commented on f75de52 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to meld, the folder that works and the folder that doesn't are 100% the same with no differences..

@rabidcopy
Copy link

@rabidcopy rabidcopy commented on f75de52 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes no sense, the files are completely identical.
image
Edit: dragging and dropping all the files from the non-working folder to the working folder and replacing them = no seg fault.. then dragging them back to the folder that doesn't work.. seg fault.

@LostRuins
Copy link
Owner Author

@LostRuins LostRuins commented on f75de52 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like something is wonky with your environment or filesystem, if the files are identical. Could it be some directory permissions you set? Might want to do a clean git clone to a different directory.

I'd also try copying the directory and pruning the git files. Maybe they are messing with it somehow.

@rabidcopy
Copy link

@rabidcopy rabidcopy commented on f75de52 Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's something wonky with how things link with the opencl-amd package on Arch..
I switched to opencl-mesa and now it works, not only that, but it provides better performance than the AMD package for OpenCL. (50ms down to 40ms on a 7B model)
🤷
Think I'm going to do a clean install either way.

@rabidcopy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reinstalled Arch, gonna figure it was a fluke, though I'm using opencl-mesa for CLBlast now as it provides better performance, and apparently it will gain more speed soon-ish.

@LostRuins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, glad you got it fixed

Please sign in to comment.