From ba56cec8077cb99b03fce500bb1c837da7667985 Mon Sep 17 00:00:00 2001 From: SilasMarvin <19626586+SilasMarvin@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:30:36 -0800 Subject: [PATCH] Restore files that gitbook wrongly edited --- ...lm-support-for-huggingface-transformers.md | 3 ++ ...uncing-support-for-aws-us-east-1-region.md | 7 +++++ .../blog/data-is-living-and-relational.md | 2 ++ ...s-with-open-source-models-in-postgresml.md | 2 ++ ...ve-search-results-with-machine-learning.md | 3 ++ ...rom-closed-to-open-source-ai-in-minutes.md | 3 ++ .../postgres-full-text-search-is-awesome.md | 1 + .../blog/postgresml-is-going-multicloud.md | 11 +++++++ .../speeding-up-vector-recall-5x-with-hnsw.md | 3 ++ ...gresml-with-django-and-embedding-search.md | 30 +++++++++++++------ 10 files changed, 56 insertions(+), 9 deletions(-) diff --git a/pgml-cms/blog/announcing-gptq-and-ggml-quantized-llm-support-for-huggingface-transformers.md b/pgml-cms/blog/announcing-gptq-and-ggml-quantized-llm-support-for-huggingface-transformers.md index 12f94aa5a..6242776db 100644 --- a/pgml-cms/blog/announcing-gptq-and-ggml-quantized-llm-support-for-huggingface-transformers.md +++ b/pgml-cms/blog/announcing-gptq-and-ggml-quantized-llm-support-for-huggingface-transformers.md @@ -3,6 +3,9 @@ description: >- GPTQ & GGML allow PostgresML to fit larger models in less RAM. These algorithms perform inference significantly faster on NVIDIA, Apple and Intel hardware. +featured: false +tags: [engineering] +image: ".gitbook/assets/image (14).png" --- # Announcing GPTQ & GGML Quantized LLM support for Huggingface Transformers diff --git a/pgml-cms/blog/announcing-support-for-aws-us-east-1-region.md b/pgml-cms/blog/announcing-support-for-aws-us-east-1-region.md index 8eab64ac6..2486bbcdc 100644 --- a/pgml-cms/blog/announcing-support-for-aws-us-east-1-region.md +++ b/pgml-cms/blog/announcing-support-for-aws-us-east-1-region.md @@ -1,3 +1,10 @@ +--- +description: >- + We added aws us east 1 to our list of support aws regions. +featured: false +tags: [product] +--- + # Announcing Support for AWS us-east-1 Region
diff --git a/pgml-cms/blog/data-is-living-and-relational.md b/pgml-cms/blog/data-is-living-and-relational.md index ff94a661f..806e14fc2 100644 --- a/pgml-cms/blog/data-is-living-and-relational.md +++ b/pgml-cms/blog/data-is-living-and-relational.md @@ -3,6 +3,8 @@ description: >- A common problem with data science and machine learning tutorials is the published and studied datasets are often nothing like what you’ll find in industry. +featured: false +tags: [engineering] --- # Data is Living and Relational diff --git a/pgml-cms/blog/generating-llm-embeddings-with-open-source-models-in-postgresml.md b/pgml-cms/blog/generating-llm-embeddings-with-open-source-models-in-postgresml.md index 2eda9bfac..f35e0081e 100644 --- a/pgml-cms/blog/generating-llm-embeddings-with-open-source-models-in-postgresml.md +++ b/pgml-cms/blog/generating-llm-embeddings-with-open-source-models-in-postgresml.md @@ -2,6 +2,8 @@ description: >- How to use the pgml.embed(...) function to generate embeddings with free and open source models in your own database. +image: ".gitbook/assets/blog_image_generating_llm_embeddings.png" +features: true --- # Generating LLM embeddings with open source models in PostgresML diff --git a/pgml-cms/blog/how-to-improve-search-results-with-machine-learning.md b/pgml-cms/blog/how-to-improve-search-results-with-machine-learning.md index 7b5a0be15..5ee950918 100644 --- a/pgml-cms/blog/how-to-improve-search-results-with-machine-learning.md +++ b/pgml-cms/blog/how-to-improve-search-results-with-machine-learning.md @@ -3,6 +3,9 @@ description: >- PostgresML makes it easy to use machine learning on your data and scale workloads horizontally in our cloud. One of the most common use cases is to improve search results. +featured: true +image: ".gitbook/assets/image (2) (2).png" +tags: ["Engineering"] --- # How-to Improve Search Results with Machine Learning diff --git a/pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md b/pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md index 75e01ca85..0b97fd29c 100644 --- a/pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md +++ b/pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md @@ -1,8 +1,11 @@ --- +featured: true +tags: [engineering, product] image: https://postgresml.org/dashboard/static/images/open_source_ai_social_share.png description: >- Quickly and easily transition from the confines of the OpenAI APIs to higher quality embeddings and unrestricted text generation models. +image: ".gitbook/assets/blog_image_switch_kit.png" --- # Introducing the OpenAI Switch Kit: Move from closed to open-source AI in minutes diff --git a/pgml-cms/blog/postgres-full-text-search-is-awesome.md b/pgml-cms/blog/postgres-full-text-search-is-awesome.md index 9b2044b2d..8cc8a8205 100644 --- a/pgml-cms/blog/postgres-full-text-search-is-awesome.md +++ b/pgml-cms/blog/postgres-full-text-search-is-awesome.md @@ -2,6 +2,7 @@ description: >- If you want to improve your search results, don't rely on expensive O(n*m) word frequency statistics. Get new sources of data instead. +image: ".gitbook/assets/image (53).png" --- # Postgres Full Text Search is Awesome! diff --git a/pgml-cms/blog/postgresml-is-going-multicloud.md b/pgml-cms/blog/postgresml-is-going-multicloud.md index 361c522ce..0100a2162 100644 --- a/pgml-cms/blog/postgresml-is-going-multicloud.md +++ b/pgml-cms/blog/postgresml-is-going-multicloud.md @@ -1,5 +1,16 @@ # PostgresML is going multicloud +
+ +
Author
+ +
+ +Lev Kokotov + +Jan 18, 2024 + + We started PostgresML two years ago with the goal of making machine learning and AI accessible and easy for everyone. To make this a reality, we needed to deploy PostgresML as closely as possible to our end users. With that goal mind, today we're proud to announce support for a new cloud provider: Azure. ### How we got here diff --git a/pgml-cms/blog/speeding-up-vector-recall-5x-with-hnsw.md b/pgml-cms/blog/speeding-up-vector-recall-5x-with-hnsw.md index 8a3bf7967..621bc99ea 100644 --- a/pgml-cms/blog/speeding-up-vector-recall-5x-with-hnsw.md +++ b/pgml-cms/blog/speeding-up-vector-recall-5x-with-hnsw.md @@ -3,6 +3,9 @@ description: >- HNSW indexing is the latest upgrade in vector recall performance. In this post we announce our updated SDK that utilizes HNSW indexing to give world class performance in vector search. +tags: [engineering] +featured: true +image: ".gitbook/assets/blog_image_hnsw.png" --- # Speeding up vector recall 5x with HNSW diff --git a/pgml-cms/blog/using-postgresml-with-django-and-embedding-search.md b/pgml-cms/blog/using-postgresml-with-django-and-embedding-search.md index f8ef12ca1..0edb3dc2c 100644 --- a/pgml-cms/blog/using-postgresml-with-django-and-embedding-search.md +++ b/pgml-cms/blog/using-postgresml-with-django-and-embedding-search.md @@ -1,10 +1,21 @@ --- -tags: - - engineering +description: >- + An example application using PostgresML and Django to build embedding based search. +tags: [engineering] --- # Using PostgresML with Django and embedding search +
+ +
Author
+ +
+ +Lev Kokotov + +Feb 15, 2024 + Building web apps on top of PostgresML allows anyone to integrate advanced machine learning and AI features into their products without much work or needing to understand how it really works. In this blog post, we'll talk about building a classic to-do Django app, with the spicy addition of semantic search powered by embedding models running inside your PostgreSQL database. ### Getting the code @@ -56,13 +67,14 @@ And that's it! In just a few lines of code, we're generating and storing high qu Djago Rest Framework provides the bulk of the implementation. We just added a `ModelViewSet` for the `TodoItem` model, with just one addition: a search endpoint. The search endpoint required us to write a bit of SQL to embed the search query and accept a few filters, but the core of it can be summarized in a single annotation on the query set: -
results = TodoItem.objects.annotate(
-    similarity=RawSQL(
+```python
+results = TodoItem.objects.annotate(
+    similarity=RawSQL(
         "pgml.embed('intfloat/e5-small', %s)::vector(384) <=> embedding",
         [query],
     )
 ).order_by("similarity")
-
+``` This single line of SQL does quite a bit: @@ -76,7 +88,7 @@ All of this happens inside PostgresML. Our Django app doesn't need to implement Before going forward, make sure you have the app running either locally or in a cloud provider of your choice. If hosting it somewhere, replace `localhost:8000` with the URL and port of your service. -The simplest way to interact with it is to use cURL or an HTTP client of your preference. If running in debug mode locally, the Rest Framework provides a nice web UI which you can access on [http://localhost:8000/api/todos/](http://localhost:8000/api/todo/) using a browser. +The simplest way to interact with it is to use cURL or your preferred HTTP client. If running in debug mode locally, the Rest Framework provides a nice web UI which you can access on [http://localhost:8000/api/todo/](http://localhost:8000/api/todo/) using a browser. To create a to-do item with cURL, you can just run this: @@ -103,13 +115,13 @@ In return, you'll get your to-do item alongside the embedding of the `descriptio The embedding contains 384 floating point numbers; we removed most of them in this blog post to make sure it fits on the page. -You can try creating multiple to-do items for fun and profit. If the description is changed, so will the embedding, demonstrating how the `intfloat/e5-small` model is understanding the semantic meaning of your text. +You can try creating multiple to-do items for fun and profit. If the description is changed, so will the embedding, demonstrating how the `intfloat/e5-small` model understands the semantic meaning of your text. ### Searching Once you have a few embeddings and to-dos stored in your database, the fun part of searching can begin. In a typical search example with PostgreSQL, you'd now be using `tsvector` to keyword match your to-dos to the search query with term frequency. That's a good technique, but semantic search is better. -We've created a simple search endpoint that accepts a query, a completed to-do filter, and a limit. To use it, you can just do this: +Our search endpoint accepts a query, a completed to-do filter, and a limit. To use it, you can just run this: ```bash curl \ @@ -122,7 +134,7 @@ curl \ If you've created a bunch of different to-do items, you should get only one search result back, and exactly the one you were expecting: ```json -"Make a New Year resolution list" +"Make a New Year resolution" ``` You can increase the `limit` to something larger and you should get more documents, in decreasing order of relevance. 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