oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
40.25k stars 5.28k forks source link

Choosing a new gguf from dropdown after defining custom rope settings for current model may result in metadata not loading properly in some situations. #4832

Closed ALittleBitTruthy closed 9 months ago

ALittleBitTruthy commented 10 months ago

Describe the bug

This is not reproduceable 100% of the time. There is a way to try to force the break so that you can see it, however (see debug step below). I believe that reloading the page in certain instances can be what causes it; once it breaks, it's broken for the rest of your instance until you restart the process. I experience this bug more often because I run Oobabooga headless via browser on other computers, and rarely close the instance; this means the page is constantly getting reloaded during a single instance of the process.

Reproduction steps: 1) Load up any Llama 2 gguf with the following settings: 6144 context, 1.75 Alpha, 18000 rope base 2) Swap in the dropdown to any 34b Yi gguf that you do not have settings saved for. (Debug Step if you can't reproduce: Go to instruction template page under Parameters and select "None". Reload the page. Go back and perform steps above again)

Expected result is that the Yi model should load the default 16384 (or 200000) context and 5000000 rope base. Instead, for me it will maintain the 6144, 1.75 alpha and 18000 rope base.

This is not limited to Yi; I chose that example because it has the most drastic difference in settings. This also occurred for me with Deepseek 33b. Because I have Oobabooga automatically load a model via CMD_Flags, I already had rope scale settings set every time I opened the UI. So when I loaded up Deepseek 33b, it didn't properly pull in the 4 compress needed for the model, and I was getting bad responses of repeating ";" characters until token limit.

Reloading the page completely with the new model selected will often (always? I haven't confirmed) properly load the new metadata. Stopping Oobabooga entirely when this starts (killing the process in the terminal/command window) and restarting it will correct the issue.

Is there an existing issue for this?

Reproduction

Reproduction steps: 1) Load up any Llama 2 gguf with the following settings: 6144 context, 1.75 Alpha, 18000 rope base 2) Load any 34b Yi gguf that you do not have settings saved for. (Debug Step if you can't reproduce: Go to instruction template page under Parameters and select "None". Reload the page. Go back and perform steps above again. Selecting a valid instruction template won't un-break it for me.)

Screenshot

No response

Logs

Traceback (most recent call last):
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/queueing.py", line 407, in call_prediction
    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/blocks.py", line 1559, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/blocks.py", line 1447, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/components/dropdown.py", line 241, in postprocess
    self._warn_if_invalid_choice(y)
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/components/dropdown.py", line 229, in _warn_if_invalid_choice
    if self.allow_custom_value or y in [value for _, value in self.choices]:
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/gradio/components/dropdown.py", line 229, in <listcomp>
    if self.allow_custom_value or y in [value for _, value in self.choices]:
                                                  ^^^^^^^^
ValueError: too many values to unpack (expected 2)

System Info

Mac Studio M2 Ultra 192GB running latest Sonoma. This machine runs Oobabooga with --listen, and the site is hit from other devices on the network.
github-actions[bot] commented 9 months ago

This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.