I took a quick look at this very interesting project and was curious how a very beefy model would behave. I chose one of the recommended models qwen3-embedding:4b an got an error during the migration.
column cannot have more than 2000 dimensions for ivfflat index
memorizer | info: Akka.Actor.ActorSystem[0]
memorizer | [INFO][06/10/2026 13:20:50.810Z][Thread 0039][akka://Memorizer/user/dimension-migration] Restoring indexes and NOT NULL constraints after regeneration
memorizer | fail: Akka.Actor.ActorSystem[0]
memorizer | [ERROR][06/10/2026 13:20:50.814Z][Thread 0041][akka://Memorizer/user/dimension-migration] Failed to restore indexes and constraints: 54000: column cannot have more than 2000 dimensions for ivfflat index
memorizer | Cause: Npgsql.PostgresException (0x80004005): 54000: column cannot have more than 2000 dimensions for ivfflat index
memorizer | at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
memorizer | at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
memorizer | at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 851
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 851
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 869
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 870
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 870
memorizer | at Memorizer.Actors.DimensionMigrationActor.HandleRegenerationCompleted(ProgressEvent progress) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 483
memorizer | Exception data:
memorizer | Severity: ERROR
memorizer | SqlState: 54000
memorizer | MessageText: column cannot have more than 2000 dimensions for ivfflat index
memorizer | File: ivfbuild.c
memorizer | Line: 353
memorizer | Routine: InitBuildState
memorizer | Npgsql.PostgresException (0x80004005): 54000: column cannot have more than 2000 dimensions for ivfflat index
memorizer | at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
memorizer | at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
memorizer | at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
memorizer | at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 851
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 851
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 869
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 870
memorizer | at Memorizer.Actors.DimensionMigrationActor.RestoreConstraintsAndIndexes(Int32 dimensions) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 870
memorizer | at Memorizer.Actors.DimensionMigrationActor.HandleRegenerationCompleted(ProgressEvent progress) in /_/src/Memorizer/Actors/DimensionMigrationActor.cs:line 483
memorizer | Exception data:
memorizer | Severity: ERROR
memorizer | SqlState: 54000
memorizer | MessageText: column cannot have more than 2000 dimensions for ivfflat index
memorizer | File: ivfbuild.c
memorizer | Line: 353
memorizer | Routine: InitBuildState
I think the quickest way would be to change ollama api calls to /api/embed (embeddings seems to be deprecated) with a dimensions parameter. Setting the dimension to a lower value than the model provides reduces quality just by a few percent but makes it compatible with the used index.
Changing the index would require a lot more, like sql queries.
I took a quick look at this very interesting project and was curious how a very beefy model would behave. I chose one of the recommended models qwen3-embedding:4b an got an error during the migration.
In short
Full message
I think the quickest way would be to change ollama api calls to /api/embed (embeddings seems to be deprecated) with a dimensions parameter. Setting the dimension to a lower value than the model provides reduces quality just by a few percent but makes it compatible with the used index.
Changing the index would require a lot more, like sql queries.