Skip to content

I'm having problems with gguf models #1662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fatihsazan opened this issue Jan 8, 2025 · 7 comments
Open

I'm having problems with gguf models #1662

fatihsazan opened this issue Jan 8, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@fatihsazan
Copy link

fatihsazan commented Jan 8, 2025

Hi,

I have issue while using the GGUF version of models.

for example non-gguf model is working ;


SELECT
    pgml.transform (
        task => '{
            "model": "meta-llama/Meta-Llama-3.1-8B-Instruct"
        }'::jsonb, 
        inputs => ARRAY[
            $$A chat between a curious user and an artificial intelligence assistant.
            The assistant gives helpful, detailed, and polite answers to the user's questions.
            USER: Please write an intro to a story about a woman living in New York.
            ASSISTANT:
            $$
        ],
        args => '{
            "max_new_tokens": 512
        }'::JSONB
    );

but when i try GGUF versions i hate faced error ,


SELECT
    pgml.transform (
        task => '{
       	  "model_type": "gguf",
        "model": "hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF",
          "model_file":"llama-3.2-1b-instruct-q8_0.gguf"		
        }'::jsonb, 
        inputs => ARRAY['{"role":"user", "content": "What is the capital of France?"}'],
        args => '{ "max_new_tokens": 128 }'::jsonb
    );

ERROR:  Traceback (most recent call last):
  File "transformers.py", line 489, in transform
  File "transformers.py", line 455, in create_pipeline
  File "transformers.py", line 217, in __init__
  File "/var/lib/postgresql/.local/lib/python3.10/site-packages/ctransformers/hub.py", line 175, in from_pretrained
    llm = LLM(
  File "/var/lib/postgresql/.local/lib/python3.10/site-packages/ctransformers/llm.py", line 253, in __init__
    raise RuntimeError(
 RuntimeError: Failed to create LLM 'gguf' from '/var/lib/postgresql/.cache/huggingface/hub/models--hugging-quants--Llama-3.2-1B-Instruct-Q8_0-GGUF/blobs/ba345c83bf5cc679c653b853c46517eea5a34f03ed2205449db77184d9ae62a9'. 

SQL state: XX000

I couldn't find how to solve this issue, I hope you can help me.

@montanalow
Copy link
Contributor

What is the output of pip freeze and what hardware are you targetting?

@fatihsazan
Copy link
Author

Hi ,
My specs,

Ubuntu 22.04.4

PostgreSQL 16.6 (Ubuntu 16.6-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

pgml | 2.9.3 | pgml

hardware are you targetting? I aim to use my CPU hardware. There is no GPU hardware

Output of my freeze list:
freeze.txt

and

I can run gguf models with lmstudio or llama-cpp-python in the same environment.

@gnusupport
Copy link

Just a side comment, so the PostgreSQL version need not be 14? It will work with higher versions?

The main website speaks that it should be 14, but does it mean minimum?

@fatihsazan
Copy link
Author

Just a side comment, so the PostgreSQL version need not be 14? It will work with higher versions?

The main website speaks that it should be 14, but does it mean minimum?

I think web site is outupdated , when I repo search for install saw newest versions.

postgres@profelis-virtual-machine:~$ apt search pgml
Sorting... Done
Full Text Search... Done
postgresql-pgml-11/unknown 2.7.10 amd64
PostgresML - machine learning with PostgreSQL

postgresql-pgml-12/unknown 2.9.3 amd64
PostgresML - machine learning with PostgreSQL

postgresql-pgml-13/unknown 2.9.3 amd64
PostgresML - machine learning with PostgreSQL

postgresql-pgml-14/unknown 2.9.3 amd64
PostgresML - machine learning with PostgreSQL

postgresql-pgml-15/unknown 2.9.3 amd64
PostgresML - machine learning with PostgreSQL

postgresql-pgml-16/unknown,now 2.9.3 amd64 [installed,automatic]
PostgresML - machine learning with PostgreSQL

@gnusupport
Copy link

Where is apt.sources for pgml?

@fatihsazan
Copy link
Author

Where is apt.sources for pgml?

https://postgresml.org/docs/open-source/pgml/developers/self-hosting/

@gnusupport
Copy link

Seems it is just for Ubuntu, but I am on Debian

@SilasMarvin SilasMarvin added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy