Content-Length: 267646 | pFad | http://github.com/postgresml/postgresml/issues/1672

D6 How to import/Load custom model into pgml? · Issue #1672 · postgresml/postgresml · GitHub
Skip to content

How to import/Load custom model into pgml? #1672

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
viswa-optimusprime opened this issue Jan 22, 2025 · 5 comments
Open

How to import/Load custom model into pgml? #1672

viswa-optimusprime opened this issue Jan 22, 2025 · 5 comments
Labels

Comments

@viswa-optimusprime
Copy link

viswa-optimusprime commented Jan 22, 2025

How to import/Load custom model into pgml? Its getting model from Hugging face but does it support custom model?
Custom model file type is pt pytorch. How insert in pgml meta data like model , files , snapshot tables?

@SilasMarvin - Could you help on this ?

@SilasMarvin
Copy link
Contributor

The pgml.transform function will automatically download a custom model from HuggingFace. Here is an example:

SELECT pgml.transform(
  task   => '{
    "task": "text-generation",
    "model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
    "token": "hf_123"
  }'::JSONB,
  inputs => ARRAY['AI is going to'],
  args   => '{
    "max_new_tokens": 100,
    "trust_remote_code": true
  }'::JSONB
);

Replace model with your model, and if the repo is gated, make sure and set a token. Change the task to the relevant task.

The "pgml meta data" tables are for models trained in the database. I don't think you should have to worry about those.

@viswa-optimusprime
Copy link
Author

viswa-optimusprime commented Jan 22, 2025

@SilasMarvin , I understand it will work for hugging face, I am looking for inhouse developed customized model to load into pgml. Downloading from hugging face not allowed due to restrictions. I have pytorch .pt file . How i can import into pgml.
Its downloadable model..

@viswa-optimusprime
Copy link
Author

@SilasMarvin - Do you have update on this ?

@viswa-optimusprime
Copy link
Author

@SilasMarvin @jonatas @kianmeng @solidsnack - - Do you have update on this ?

@jonatas
Copy link
Contributor

jonatas commented Feb 3, 2025

I haven't worked on this project @viswa-optimusprime. Not sure where did you got my name from 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgresml/postgresml/issues/1672

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy