GithubHelp home page GithubHelp logo

Comments (5)

mpah avatar mpah commented on August 15, 2024

same on google colab

from gptq-for-llama.

thulle avatar thulle commented on August 15, 2024
diff --git a/llama.py b/llama.py
index 09b527e..cc652dd 100644
--- a/llama.py
+++ b/llama.py
@@ -238,7 +238,7 @@ def load_quant(model, checkpoint, wbits):
     make_quant(model, layers, wbits)
 
     print('Loading model ...')
-    if checkpoint.endswith('.safetensors'):
+    if checkpoint.as_posix().endswith('.safetensors'):
         from safetensors.torch import load_file as safe_load
         model.load_state_dict(safe_load(checkpoint))
     else:

that patch worked for me in linux at least

from gptq-for-llama.

aaronsantiago avatar aaronsantiago commented on August 15, 2024

Same on windows native. A similar solution worked for me (skipping that check entirely).

from gptq-for-llama.

qwopqwop200 avatar qwopqwop200 commented on August 15, 2024

Fixed a bug.
Please test if you still have such problem.
I didn't encounter such problem with wsl2.

from gptq-for-llama.

TheTerrasque avatar TheTerrasque commented on August 15, 2024

I can confirm the same problem with current code:

text-generation-webui-text-generation-webui-1  | Loading llama-13b...
text-generation-webui-text-generation-webui-1  | Loading model ...
text-generation-webui-text-generation-webui-1  | Traceback (most recent call last):
text-generation-webui-text-generation-webui-1  |   File "/app/server.py", line 194, in <module>
text-generation-webui-text-generation-webui-1  |     shared.model, shared.tokenizer = load_model(shared.model_name)
text-generation-webui-text-generation-webui-1  |   File "/app/modules/models.py", line 119, in load_model
text-generation-webui-text-generation-webui-1  |     model = load_quant(path_to_model, Path(f"models/{pt_model}"), 4)
text-generation-webui-text-generation-webui-1  |   File "/app/repositories/GPTQ-for-LLaMa/llama.py", line 241, in load_quant
text-generation-webui-text-generation-webui-1  |     if checkpoint.endswith('.safetensors'):
text-generation-webui-text-generation-webui-1  | AttributeError: 'PosixPath' object has no attribute 'endswith'

Docker under Windows, python 3.10

Edit: on a side note, this might be connected to the python version

Edit2: After a rebuild now, I can't reproduce the error. Not sure what happened, it could be possible docker used an old build cache, but I don't see how. That layer have only started working due to changes done today which should invalidate all old layer caches.

from gptq-for-llama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.