Skip to content

Commit 140e79a

Browse files
chillenbergerSilasMarvin
authored andcommitted
Dan blog career article pages (#1338)
1 parent 63963d4 commit 140e79a

File tree

33 files changed

+733
-93
lines changed

33 files changed

+733
-93
lines changed

pgml-cms/docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ description: The key concepts that make up PostgresML.
44

55
# Overview
66

7-
PostgresML is a complete MLOps platform built on PostgreSQL.
7+
PostgresML is a complete MLOps platform built on PostgreSQL. 
88

99
> _Move the models to the database_, _rather than continuously moving the data to the models._
1010
11-
The data for ML & AI systems is inherently larger and more dynamic than the models. It's more efficient, manageable and reliable to move the models to the database, rather than continuously moving the data to the models\_.\_ PostgresML allows you to take advantage of the fundamental relationship between data and models, by extending the database with the following capabilities and goals:
11+
The data for ML & AI systems is inherently larger and more dynamic than the models. It's more efficient, manageable and reliable to move the models to the database, rather than continuously moving the data to the models. PostgresML allows you to take advantage of the fundamental relationship between data and models, by extending the database with the following capabilities and goals:
1212

1313
* **Model Serving** - _**GPU accelerated**_ inference engine for interactive applications, with no additional networking latency or reliability costs.
1414
* **Model Store** - Download _**open-source**_ models including state of the art LLMs from HuggingFace, and track changes in performance between versions.
1515
* **Model Training** - Train models with _**your application data**_ using more than 50 algorithms for regression, classification or clustering tasks. Fine tune pre-trained models like LLaMA and BERT to improve performance.
16-
* **Feature Store** - _**Scalable**_ access to model inputs, including vector, text, categorical, and numeric data. Vector database, text search, knowledge graph and application data all in one _**low-latency**_ system.
16+
* **Feature Store** - _**Scalable**_ access to model inputs, including vector, text, categorical, and numeric data. Vector database, text search, knowledge graph and application data all in one _**low-latency**_ system. 
1717

1818
<figure><img src=".gitbook/assets/ml_system.svg" alt="Machine Learning Infrastructure (2.0) by a16z"><figcaption><p>PostgresML handles all of the functions typically performed by a cacophony of services, <a href="https://a16z.com/emerging-architectures-for-modern-data-infrastructure/">described by a16z</a></p></figcaption></figure>
1919

20-
These capabilities are primarily provided by two open-source software projects, that may be used independently, but are designed to be used with the rest of the Postgres ecosystem, including trusted extensions like pgvector and pg\_partman.
20+
These capabilities are primarily provided by two open-source software projects, that may be used independently, but are designed to be used with the rest of the Postgres ecosystem, including trusted extensions like pgvector and pg\_partman.&#x20;
2121

2222
* **pgml** is an open source extension for PostgreSQL. It adds support for GPUs and the latest ML & AI algorithms _**inside**_ the database with a SQL API and no additional infrastructure, networking latency, or reliability costs.
2323
* **PgCat** is an open source proxy pooler for PostgreSQL. It abstracts the scalability and reliability concerns of managing a distributed cluster of Postgres databases. Client applications connect only to the proxy, which handles load balancing and failover, _**outside**_ of any single database.
2424

2525
<figure><img src=".gitbook/assets/architecture.png" alt="PostgresML architectural diagram" width="275"><figcaption><p>A PostgresML deployment at scale</p></figcaption></figure>
2626

27-
In addition, PostgresML provides [native language SDKs](https://github.com/postgresml/postgresml/tree/master/pgml-sdks/pgml) to implement best practices for common ML & AI applications. The JavaScript and Python SDKs are generated from the core Rust SDK, to provide the same API, correctness and efficiency across all application runtimes.
27+
In addition, PostgresML provides [native language SDKs](https://github.com/postgresml/postgresml/tree/master/pgml-sdks/pgml) to implement best practices for common ML & AI applications. The JavaScript and Python SDKs are generated from the core Rust SDK, to provide the same API, correctness and efficiency across all application runtimes.&#x20;
2828

2929
SDK clients can perform advanced machine learning tasks in a single SQL request, without having to transfer additional data, models, hardware or dependencies to the client application. For example:
3030

@@ -36,6 +36,6 @@ SDK clients can perform advanced machine learning tasks in a single SQL request,
3636
* Forecasting timeseries data for key metrics with complex metadata
3737
* Fraud and anomaly detection with application data
3838

39-
Our goal is to provide access to Open Source AI for everyone. PostgresML is under continuous development to keep up with the rapidly evolving use cases for ML & AI, and we release non breaking changes with minor version updates in accordance with SemVer. We welcome contributions to our [open source code and documentation](https://github.com/postgresml).
39+
Our goal is to provide access to Open Source AI for everyone. PostgresML is under continuous development to keep up with the rapidly evolving use cases for ML & AI, and we release non breaking changes with minor version updates in accordance with SemVer. We welcome contributions to our [open source code and documentation](https://github.com/postgresml).&#x20;
4040

4141
We can host your AI database in our cloud, or you can run our Docker image locally with PostgreSQL, pgml, pgvector and NVIDIA drivers included.

pgml-cms/docs/introduction/apis/sql-extensions/pgml.deploy.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
description: >-
3+
Release trained models when ML quality metrics computed during training improve. Track model deployments over time and rollback if needed.
4+
---
5+
16
# pgml.deploy()
27

38
## Deployments
@@ -27,7 +32,7 @@ pgml.deploy(
2732
There are 3 different deployment strategies available:
2833

2934
| Strategy | Description |
30-
| ------------- | ------------------------------------------------------------------------------------------------ |
35+
| ------------- |--------------------------------------------------------------------------------------------------|
3136
| `most_recent` | The most recently trained model for this project is immediately deployed, regardless of metrics. |
3237
| `best_score` | The model that achieved the best key metric score is immediately deployed. |
3338
| `rollback` | The model that was deployed before to the current one is deployed. |
@@ -79,6 +84,8 @@ SELECT * FROM pgml.deploy(
7984
(1 row)
8085
```
8186

87+
88+
8289
### Rolling Back
8390

8491
In case the new model isn't performing well in production, it's easy to rollback to the previous version. A rollback creates a new deployment for the old model. Multiple rollbacks in a row will oscillate between the two most recently deployed models, making rollbacks a safe and reversible operation.
@@ -123,7 +130,7 @@ SELECT * FROM pgml.deploy(
123130

124131
### Specific Model IDs
125132

126-
In the case you need to deploy an exact model that is not the `most_recent` or `best_score`, you may deploy a model by id. Model id's can be found in the `pgml.models` table.
133+
In the case you need to deploy an exact model that is not the `most_recent` or `best_score`, you may deploy a model by id. Model id's can be found in the `pgml.models` table.
127134

128135
#### SQL
129136

pgml-cms/docs/introduction/apis/sql-extensions/pgml.embed.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
description: >-
3+
Generate high quality embeddings with faster end-to-end vector operations without an additional vector database.
4+
---
5+
16
# pgml.embed()
27

38
Embeddings are a numeric representation of text. They are used to represent words and sentences as vectors, an array of numbers. Embeddings can be used to find similar pieces of text, by comparing the similarity of the numeric vectors using a distance measure, or they can be used as input features for other machine learning models, since most algorithms can't use text directly.

pgml-cms/docs/introduction/apis/sql-extensions/pgml.predict/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
description: >-
3+
Batch predict from data in a table. Online predict with parameters passed in a query. Automatically reuse pre-processing steps from training.
4+
---
5+
16
# pgml.predict()
27

38
## API
@@ -51,7 +56,7 @@ LIMIT 25;
5156

5257
### Classification Example
5358

54-
If you've already been through the [pgml.train](../pgml.train "mention") examples, you can see the predictive results of those models:
59+
If you've already been through the [pgml.train](../pgml.train/ "mention") examples, you can see the predictive results of those models:
5560

5661
```sql
5762
SELECT

pgml-cms/docs/introduction/apis/sql-extensions/pgml.train/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
description: >-
3-
The training function is at the heart of PostgresML. It's a powerful single
4-
mechanism that can handle many different training tasks which are configurable
5-
with the function parameters.
3+
Pre-process and pull data to train a model using any of 50 different ML algorithms.
64
---
75

86
# pgml.train()
@@ -35,7 +33,7 @@ pgml.train(
3533
| Parameter | Example | Description |
3634
| --------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3735
| `project_name` | `'Search Results Ranker'` | An easily recognizable identifier to organize your work. |
38-
| `task` | `'regression'` | The objective of the experiment: `regression`, `classification` or `cluster` |
36+
| `task` | `'regression'` | The objective of the experiment: `regression`, `classification` or `cluster` |
3937
| `relation_name` | `'public.search_logs'` | The Postgres table or view where the training data is stored or defined. |
4038
| `y_column_name` | `'clicked'` | The name of the label (aka "target" or "unknown") column in the training table. |
4139
| `algorithm` | `'xgboost'` | <p>The algorithm to train on the dataset, see the task specific pages for available algorithms:<br><a data-mention href="regression.md">regression.md</a></p><p><a data-mention href="classification.md">classification.md</a><br><a data-mention href="clustering.md">clustering.md</a></p> |

pgml-cms/docs/introduction/apis/sql-extensions/pgml.transform/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
description: >-
3+
Perform dozens of state-of-the-art natural language processing (NLP) tasks with thousands of models. Serve with the same Postgres infrastructure.
24
layout:
35
title:
46
visible: true

pgml-cms/docs/introduction/apis/sql-extensions/pgml.tune.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
---
2+
description: >-
3+
Fine tune open-source models on your own data.
4+
---
5+
16
# pgml.tune()
27

38
## Fine Tuning
49

5-
Pre-trained models allow you to get up and running quickly, but you can likely improve performance on your dataset by fine tuning them. Normally, you'll bring your own data to the party, but for these examples we'll use datasets published on Hugging Face.
10+
Pre-trained models allow you to get up and running quickly, but you can likely improve performance on your dataset by fine tuning them. Normally, you'll bring your own data to the party, but for these examples we'll use datasets published on Hugging Face.&#x20;
611

712
### Translation Example
813

pgml-cms/docs/resources/benchmarks/ggml-quantized-llm-support-for-huggingface-transformers.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
---
2+
description: >-
3+
Quantization allows PostgresML to fit larger models in less RAM.
4+
---
15
# GGML Quantized LLM support for Huggingface Transformers
26

7+
8+
39
Quantization allows PostgresML to fit larger models in less RAM. These algorithms perform inference significantly faster on NVIDIA, Apple and Intel hardware. Half-precision floating point and quantized optimizations are now available for your favorite LLMs downloaded from Huggingface.
410

511
## Introduction
@@ -54,7 +60,8 @@ SELECT pgml.transform(
5460

5561
## Quantization
5662

57-
_Discrete quantization is not a new idea. It's been used by both algorithms and artists for more than a hundred years._\\
63+
_Discrete quantization is not a new idea. It's been used by both algorithms and artists for more than a hundred years._\
64+
5865

5966
Going beyond 16-bit down to 8 or 4 bits is possible, but not with hardware accelerated floating point operations. If we want hardware acceleration for smaller types, we'll need to use small integers w/ vectorized instruction sets. This is the process of _quantization_. Quantization can be applied to existing models trained with 32-bit floats, by converting the weights to smaller integer primitives that will still benefit from hardware accelerated instruction sets like Intel's [AVX](https://en.wikipedia.org/wiki/Advanced\_Vector\_Extensions). A simple way to quantize a model can be done by first finding the maximum and minimum values of the weights, then dividing the range of values into the number of buckets available in your integer type, 256 for 8-bit, 16 for 4-bit. This is called _post-training quantization_, and it's the simplest way to quantize a model.
6067

pgml-cms/docs/resources/benchmarks/making-postgres-30-percent-faster-in-production.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: >-
3+
Anyone who runs Postgres at scale knows that performance comes with trade offs.
4+
---
15
# Making Postgres 30 Percent Faster in Production
26

37
Anyone who runs Postgres at scale knows that performance comes with trade offs. The typical playbook is to place a pooler like PgBouncer in front of your database and turn on transaction mode. This makes multiple clients reuse the same server connection, which allows thousands of clients to connect to your database without causing a fork bomb.

pgml-cms/docs/resources/benchmarks/million-requests-per-second.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Scaling to 1 Million Requests per Second
1+
---
2+
description: >-
3+
The question "Does it Scale?" has become somewhat of a meme in software engineering.
4+
---
5+
# Million Requests per Second
26

37
The question "Does it Scale?" has become somewhat of a meme in software engineering. There is a good reason for it though, because most businesses plan for success. If your app, online store, or SaaS becomes popular, you want to be sure that the system powering it can serve all your new customers.
48

pgml-cms/docs/resources/benchmarks/mindsdb-vs-postgresml.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: >-
3+
Compare two projects that both aim
to provide an SQL interface to ML algorithms and the data they require.
4+
---
15
# MindsDB vs PostgresML
26

37
## Introduction

pgml-cms/docs/resources/benchmarks/postgresml-is-8-40x-faster-than-python-http-microservices.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: >-
3+
PostgresML is a simpler alternative to that ever-growing complexity.
4+
---
15
# PostgresML is 8-40x faster than Python HTTP microservices
26

37
Machine learning architectures can be some of the most complex, expensive and _difficult_ arenas in modern systems. The number of technologies and the amount of required hardware compete for tightening headcount, hosting, and latency budgets. Unfortunately, the trend in the industry is only getting worse along these lines, with increased usage of state-of-the-art architectures that center around data warehouses, microservices and NoSQL databases.

pgml-cms/docs/use-cases/embeddings/generating-llm-embeddings-with-open-source-models-in-postgresml.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Generating LLM embeddings with open source models
1+
# Generating LLM embeddings with open source models in PostgresML
2+
3+
24

35
PostgresML makes it easy to generate embeddings from text in your database using a large selection of state-of-the-art models with one simple call to **`pgml.embed`**`(model_name, text)`. Prove the results in this series to your own satisfaction, for free, by signing up for a GPU accelerated database.
46

@@ -15,6 +17,8 @@ In recent years, embeddings have become an increasingly popular technique in mac
1517

1618
They can also turn natural language into quantitative features for downstream machine learning models and applications.
1719

20+
21+
1822
_Embeddings show us the relationships between rows in the database._
1923

2024
A popular use case driving the adoption of "vector databases" is doing similarity search on embeddings, often referred to as "Semantic Search". This is a powerful technique that allows you to find similar items in large datasets by comparing their vectors. For example, you could use it to find similar products in an e-commerce site, similar songs in a music streaming service, or similar documents given a text query.
@@ -102,7 +106,7 @@ LIMIT 5;
102106

103107
## Generating embeddings from natural language text
104108

105-
PostgresML provides a simple interface to generate embeddings from text in your database. You can use the [`pgml.embed`](https://postgresml.org/docs/transformers/embeddings) function to generate embeddings for a column of text. The function takes a transformer name and a text value. The transformer will automatically be downloaded and cached on your connection process for reuse. You can see a list of potential good candidate models to generate embeddings on the [Massive Text Embedding Benchmark leaderboard](https://huggingface.co/spaces/mteb/leaderboard).
109+
PostgresML provides a simple interface to generate embeddings from text in your database. You can use the [`pgml.embed`](/docs/introduction/apis/sql-extensions/pgml.embed) function to generate embeddings for a column of text. The function takes a transformer name and a text value. The transformer will automatically be downloaded and cached on your connection process for reuse. You can see a list of potential good candidate models to generate embeddings on the [Massive Text Embedding Benchmark leaderboard](https://huggingface.co/spaces/mteb/leaderboard).
106110

107111
Since our corpus of documents (movie reviews) are all relatively short and similar in style, we don't need a large model. [`intfloat/e5-small`](https://huggingface.co/intfloat/e5-small) will be a good first attempt. The great thing about PostgresML is you can always regenerate your embeddings later to experiment with different embedding models.
108112

@@ -198,7 +202,8 @@ For comparison, it would cost about $299 to use OpenAI's cheapest embedding mode
198202
| GPU | 17ms | $72 | 6 hours |
199203
| OpenAI | 300ms | $299 | millennia |
200204

201-
\\
205+
\
206+
202207

203208
You can also find embedding models that outperform OpenAI's `text-embedding-ada-002` model across many different tests on the [leaderboard](https://huggingface.co/spaces/mteb/leaderboard). It's always best to do your own benchmarking with your data, models, and hardware to find the best fit for your use case.
204209

0 commit comments

Comments
 (0)
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