You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pgml-cms/docs/resources/benchmarks/ggml-quantized-llm-support-for-huggingface-transformers.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ SELECT pgml.transform(
58
58
59
59
##Quantization
60
60
61
-
_Discrete quantization is not a new idea. It's been used by both algorithms and artists for more than a hundred years._\\
61
+
_Discrete quantization is not a new idea. It's been used by both algorithms and artists for more than a hundred years._
62
62
63
63
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.
Copy file name to clipboardExpand all lines: pgml-cms/docs/resources/benchmarks/mindsdb-vs-postgresml.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Another difference is that PostgresML also supports embedding models, and closel
44
44
45
45
The architectural implementations for these projects is significantly different. PostgresML takes a data centric approach with Postgres as the provider for both storage_and_ compute. To provide horizontal scalability for inference, the PostgresML team has also created[PgCat](https://github.com/postgresml/pgcat) to distribute workloads across many Postgres databases. On the other hand, MindsDB takes a service oriented approach that connects to various databases over the network.
@@ -59,7 +59,7 @@ The architectural implementations for these projects is significantly different.
59
59
| On Premise| ✅| ✅|
60
60
| Web UI| ✅| ✅|
61
61
62
-
\\
62
+
63
63
64
64
The difference in architecture leads to different tradeoffs and challenges. There are already hundreds of ways to get data into and out of a Postgres database, from just about every other service, language and platform that makes PostgresML highly compatible with other application workflows. On the other hand, the MindsDB Python service accepts connections from specifically supported clients like`psql` and provides a pseudo-SQL interface to the functionality. The service will parse incoming MindsDB commands that look similar to SQL (but are not), for tasks like configuring database connections, or doing actual machine learning. These commands typically have what looks like a sub-select, that will actually fetch data over the wire from configured databases for Machine Learning training and inference.
65
65
@@ -287,7 +287,7 @@ PostgresML is the clear winner in terms of performance. It seems to me that it c
There is a general trend, the larger and slower the model is, the more work is spent inside libtorch, the less the performance of the rest matters, but for interactive models and use cases there is a significant difference. We've tried to cover the most generous use case we could between these two. If we were to compare XGBoost or other classical algorithms, that can have sub millisecond prediction times in PostgresML, the 20ms Python service overhead of MindsDB just to parse the incoming query would be hundreds of times slower.
Copy file name to clipboardExpand all lines: pgml-cms/docs/use-cases/embeddings/generating-llm-embeddings-with-open-source-models-in-postgresml.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ For comparison, it would cost about $299 to use OpenAI's cheapest embedding mode
198
198
| GPU| 17ms| $72| 6 hours|
199
199
| OpenAI| 300ms| $299| millennia|
200
200
201
-
\\
201
+
202
202
203
203
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.