Skip to content

Lambda function#1

Draft
stefan-novak-brt wants to merge 2 commits into
mainfrom
lambda-function
Draft

Lambda function#1
stefan-novak-brt wants to merge 2 commits into
mainfrom
lambda-function

Conversation

@stefan-novak-brt

@stefan-novak-brt stefan-novak-brt commented May 24, 2023

Copy link
Copy Markdown
Collaborator

Here's an initial work of deploying a RetrievalQA inside of a Lambda function. The approach here is to load the sample dataset into a Chroma database and persist it during the image build phase. When the Lambda runs, it'll be able to open the database on-the-fly.

Steps to run:

  1. Download ggml-alpaca-7b-q4.bin to the models/ directory.
  2. Run make image

Once the Docker image can be built, we can add a Terraform config to deploy the Lambda function to AWS. We can hook up the Lambda to the AWS API Gateway so that a web app can call it via a REST API.

@stefan-novak-brt

Copy link
Copy Markdown
Collaborator Author

When lambda.py runs during the build phase, the following error is occurring:

 > [8/8] RUN python3 lambda.py:
#0 3.412 llama.cpp: loading model from models/ggml-alpaca-7b-q4.bin
#0 81.88 terminate called after throwing an instance of 'std::runtime_error'
#0 81.88   what():  unexpectedly reached end of file
#0 95.02 Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant