Skip to content
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

Roadmap: run only in browser with no required python backend #107

Open
4 tasks
willeppy opened this issue May 30, 2024 · 3 comments
Open
4 tasks

Roadmap: run only in browser with no required python backend #107

willeppy opened this issue May 30, 2024 · 3 comments
Labels
feature New feature or request

Comments

@willeppy
Copy link
Member

Right now, Texture is built around having a python FastAPI backend that holds the data, executes all queries, and is called by the frontend. This isn't totally necessary, and ties the interface to the python backend making it harder to deploy.

I think a better system would be to take an approach similar to mosaic (https://uwdata.github.io/mosaic/server/) where the backend can be totally in browser with duckdb wasm, etc, OR can make calls to a python server.

Rewrite to be in TS

To start making this, I think would require the following steps to get rid of the python backend

  • The main server file is in server.py (https://github.com/cmudig/Texture/blob/main/texture/server.py) which has a couple of core components that would need to be moved to be frontend only:
  • Duckdb queries
  • Lancedb queries for vector search
  • OpenAI queries for LLMs (separate issue is ability to connect to custom LLM for transforms)

I suspect there's probably some code cleanup that would need to happen to have a consistent API that can be implemented by a backend "client" that is either only in javascript, or could be in Python, etc

@willeppy willeppy added the feature New feature or request label May 30, 2024
@jaanli
Copy link

jaanli commented May 31, 2024

@onefact should be able to help with this!

@jaanli
Copy link

jaanli commented Jun 1, 2024

I wonder if systems like WASMEdge could help here.

one idea is something like https://github.com/LlamaEdge/LlamaEdge

Can use this to prototype, then do a custom Rust implementation of an encoder-only model. That will solve most use cases. (Or use Gemma if it’s small enough? But llama is a more widely used backbone..)

@jaanli
Copy link

jaanli commented Jun 2, 2024

it would be nice if this supports DSPy as well: https://dspy-docs.vercel.app/docs/deep-dive/modules/program-of-thought

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

No branches or pull requests

2 participants