Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 851 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 851 Bytes

modal-sqlcoder

Deploy defog sqlcoder2 on Modal using Text Generation Inference (TGI)

Adapted from:

Set up environment

Set up your HUGGING_FACE_HUB_TOKEN environment variable in a Modal Secret named huggingface.

Serve the model

Deploy this model with

$ modal deploy sql_generation_inference.py

Invoke the model from other apps

Once the model is deployed, we can invoke inference from other apps, sharing the same pool of GPU containers with all other apps we might need.

$ python
>>> import modal
>>> f = modal.Function.lookup("example-tgi-sqlcoder2", "Model.generate")
>>> result = f.remote("How many salespeople are there?", metadata="(Replace with your own metadata)")