Sentence Similarity
ONNX
Safetensors
English
ogma
embeddings
dense-retrieval
matryoshka
rag
agents
mteb
semantic-search
text-embeddings
text-embedding
vector-search
document-retrieval
similarity-search
classification
clustering
edge-ai
on-device
local-inference
efficient-ai
rag-retrieval
custom_code
Eval Results (legacy)
File size: 22,203 Bytes
1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f 376b592 1892d8f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | ---
language:
- en
license: mit
tags:
- mteb
- sentence-transformers
- embedding
- text-embedding
- ogma
- axiotic
- matryoshka
- small-model
model-index:
- name: ogma-base
results:
- task:
type: Classification
dataset:
type: mteb/AmazonCounterfactualClassification
name: MTEB AmazonCounterfactualClassification
config: default
split: test
revision: 1f7e6a9d6fa6e64c53d146e428565640410c0df1
metrics:
- type: accuracy
value: 73.13
- task:
type: Classification
dataset:
type: mteb/AmazonPolarityClassification
name: MTEB AmazonPolarityClassification
config: default
split: test
revision: e2d317d38cd51312af73b3d32a06d1a08b442046
metrics:
- type: accuracy
value: 79.85
- task:
type: Classification
dataset:
type: mteb/AmazonReviewsClassification
name: MTEB AmazonReviewsClassification
config: default
split: test
revision: 6b5d328eaae8ef408dd7d775040245cf86f92e9d
metrics:
- type: accuracy
value: 39.47
- task:
type: Clustering
dataset:
type: mteb/ArXivHierarchicalClusteringP2P
name: MTEB ArXivHierarchicalClusteringP2P
config: default
split: test
revision: 0bbdb47bcbe3a90093699aefeed338a0f28a7ee8
metrics:
- type: v_measure
value: 55.83
- task:
type: Clustering
dataset:
type: mteb/ArXivHierarchicalClusteringS2S
name: MTEB ArXivHierarchicalClusteringS2S
config: default
split: test
revision: b73bd54100e5abfa6e3a23dcafb46fe4d2438dc3
metrics:
- type: v_measure
value: 52.73
- task:
type: Retrieval
dataset:
type: mteb/ArguAna
name: MTEB ArguAna
config: default
split: test
revision: c22ab2a51041ffd869aaddef7af8d8215647e41a
metrics:
- type: ndcg_at_10
value: 45.0
- task:
type: Reranking
dataset:
type: mteb/AskUbuntuDupQuestions
name: MTEB AskUbuntuDupQuestions
config: default
split: test
revision: c5691e3c48741d5f83b5cc8e630653d7a8cfc048
metrics:
- type: map
value: 56.76
- task:
type: STS
dataset:
type: mteb/BIOSSES
name: MTEB BIOSSES
config: default
split: test
revision: d3fb88f8f02e40887cd149695127462bbcf29b4a
metrics:
- type: cosine_spearman
value: 84.15
- task:
type: Classification
dataset:
type: mteb/Banking77Classification
name: MTEB Banking77Classification
config: default
split: test
revision: 0fd18e25b25c072e09e0d92ab615fda904d66300
metrics:
- type: accuracy
value: 78.56
- task:
type: Clustering
dataset:
type: mteb/BiorxivClusteringP2P
name: MTEB BiorxivClusteringP2P
config: default
split: test
revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40
metrics:
- type: v_measure
value: 34.11
- task:
type: Clustering
dataset:
type: mteb/BiorxivClusteringS2S
name: MTEB BiorxivClusteringS2S
config: default
split: test
revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908
metrics:
- type: v_measure
value: 26.34
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackAndroidRetrieval
name: MTEB CQADupstackAndroidRetrieval
config: default
split: test
revision: 9be4c0e46342e8e3aff577a89b9a1ec9bc6b4af3
metrics:
- type: ndcg_at_10
value: 37.28
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackEnglishRetrieval
name: MTEB CQADupstackEnglishRetrieval
config: default
split: test
revision: ad9991cb51e31e31e430383c75ffb2885547b5f0
metrics:
- type: ndcg_at_10
value: 34.91
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackGamingRetrieval
name: MTEB CQADupstackGamingRetrieval
config: default
split: test
revision: 4885aa143210c98657558c04aaf3dc47cfb54340
metrics:
- type: ndcg_at_10
value: 44.91
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackGisRetrieval
name: MTEB CQADupstackGisRetrieval
config: default
split: test
revision: 5003b3064772da1887988e05400cf3806fe491f2
metrics:
- type: ndcg_at_10
value: 29.65
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackMathematicaRetrieval
name: MTEB CQADupstackMathematicaRetrieval
config: default
split: test
revision: 90fceea13679c63fe563ded68f3b6f06e50061de
metrics:
- type: ndcg_at_10
value: 24.91
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackPhysicsRetrieval
name: MTEB CQADupstackPhysicsRetrieval
config: default
split: test
revision: 79531abbd1fb92d06c6d6315a0cbbbf5bb247ea4
metrics:
- type: ndcg_at_10
value: 34.23
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackProgrammersRetrieval
name: MTEB CQADupstackProgrammersRetrieval
config: default
split: test
revision: 6184bc1440d2dbc7612be22b50686b8826d22b32
metrics:
- type: ndcg_at_10
value: 33.53
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackRetrieval
name: MTEB CQADupstackRetrieval
config: default
split: test
revision: '1'
metrics:
- type: ndcg_at_10
value: 31.05
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackStatsRetrieval
name: MTEB CQADupstackStatsRetrieval
config: default
split: test
revision: 65ac3a16b8e91f9cee4c9828cc7c335575432a2a
metrics:
- type: ndcg_at_10
value: 26.66
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackTexRetrieval
name: MTEB CQADupstackTexRetrieval
config: default
split: test
revision: 46989137a86843e03a6195de44b09deda022eec7
metrics:
- type: ndcg_at_10
value: 21.77
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackUnixRetrieval
name: MTEB CQADupstackUnixRetrieval
config: default
split: test
revision: 6c6430d3a6d36f8d2a829195bc5dc94d7e063e53
metrics:
- type: ndcg_at_10
value: 29.57
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackWebmastersRetrieval
name: MTEB CQADupstackWebmastersRetrieval
config: default
split: test
revision: 160c094312a0e1facb97e55eeddb698c0abe3571
metrics:
- type: ndcg_at_10
value: 31.33
- task:
type: Retrieval
dataset:
type: mteb/CQADupstackWordpressRetrieval
name: MTEB CQADupstackWordpressRetrieval
config: default
split: test
revision: 4ffe81d471b1924886b33c7567bfb200e9eec5c4
metrics:
- type: ndcg_at_10
value: 23.86
- task:
type: Retrieval
dataset:
type: mteb/ClimateFEVER
name: MTEB ClimateFEVER
config: default
split: test
revision: 47f2ac6acb640fc46020b02a5b59fdda04d39380
metrics:
- type: ndcg_at_10
value: 28.51
- task:
type: Retrieval
dataset:
type: mteb/DBPedia
name: MTEB DBPedia
config: default
split: test
revision: c0f706b76e590d620bd6618b3ca8efdd34e2d659
metrics:
- type: ndcg_at_10
value: 36.32
- task:
type: Classification
dataset:
type: mteb/EmotionClassification
name: MTEB EmotionClassification
config: default
split: test
revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37
metrics:
- type: accuracy
value: 47.69
- task:
type: Retrieval
dataset:
type: mteb/FEVER
name: MTEB FEVER
config: default
split: test
revision: bea83ef9e8fb933d90a2f1d5515737465d613e12
metrics:
- type: ndcg_at_10
value: 60.27
- task:
type: Retrieval
dataset:
type: mteb/FiQA2018
name: MTEB FiQA2018
config: default
split: test
revision: 27a168819829fe9bcd655c2df245fb19452e8e06
metrics:
- type: ndcg_at_10
value: 32.59
- task:
type: Retrieval
dataset:
type: mteb/HotpotQA
name: MTEB HotpotQA
config: default
split: test
revision: ab518f4d6fcca38d87c25209f94beba119d02014
metrics:
- type: ndcg_at_10
value: 52.43
- task:
type: Classification
dataset:
type: mteb/ImdbClassification
name: MTEB ImdbClassification
config: default
split: test
revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7
metrics:
- type: accuracy
value: 73.59
- task:
type: Retrieval
dataset:
type: mteb/MSMARCO
name: MTEB MSMARCO
config: default
split: test
revision: c5a29a104738b98a9e76336939199e264163d4a0
metrics:
- type: ndcg_at_10
value: 0
- task:
type: Classification
dataset:
type: mteb/MTOPDomainClassification
name: MTEB MTOPDomainClassification
config: default
split: test
revision: a76d16fae880597b9c73047b50159220a441cb54
metrics:
- type: accuracy
value: 90.37
- task:
type: Classification
dataset:
type: mteb/MTOPIntentClassification
name: MTEB MTOPIntentClassification
config: default
split: test
revision: 2992d820f31312593c49a4890430aadadb0f0039
metrics:
- type: accuracy
value: 62.51
- task:
type: Classification
dataset:
type: mteb/MassiveIntentClassification
name: MTEB MassiveIntentClassification
config: default
split: test
revision: 4672e20407010da34463acc759c162ca9734bca6
metrics:
- type: accuracy
value: 68.19
- task:
type: Classification
dataset:
type: mteb/MassiveScenarioClassification
name: MTEB MassiveScenarioClassification
config: default
split: test
revision: fad2c6e8459f9e1c45d9315f4953d921437d70f8
metrics:
- type: accuracy
value: 73.07
- task:
type: Clustering
dataset:
type: mteb/MedrxivClusteringP2P
name: MTEB MedrxivClusteringP2P
config: default
split: test
revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73
metrics:
- type: v_measure
value: 32.02
- task:
type: Clustering
dataset:
type: mteb/MedrxivClusteringS2S
name: MTEB MedrxivClusteringS2S
config: default
split: test
revision: 35191c8c0dca72d8ff3efcd72aa802307d469663
metrics:
- type: v_measure
value: 29.22
- task:
type: Reranking
dataset:
type: mteb/MindSmallReranking
name: MTEB MindSmallReranking
config: default
split: test
revision: 227478e3235572039f4f7661840e059f31ef6eb1
metrics:
- type: map
value: 30.62
- task:
type: Retrieval
dataset:
type: mteb/NFCorpus
name: MTEB NFCorpus
config: default
split: test
revision: ec0fa4fe99da2ff19ca1214b7966684033a58814
metrics:
- type: ndcg_at_10
value: 30.35
- task:
type: Retrieval
dataset:
type: mteb/NQ
name: MTEB NQ
config: default
split: test
revision: b774495ed302d8c44a3a7ea25c90dbce03968f31
metrics:
- type: ndcg_at_10
value: 50.71
- task:
type: Retrieval
dataset:
type: mteb/QuoraRetrieval
name: MTEB QuoraRetrieval
config: default
split: test
revision: e4e08e0b7dbe3c8700f0daef558ff32256715259
metrics:
- type: ndcg_at_10
value: 60.88
- task:
type: Clustering
dataset:
type: mteb/RedditClustering
name: MTEB RedditClustering
config: default
split: test
revision: 24640382cdbf8abc73003fb0fa6d111a705499eb
metrics:
- type: v_measure
value: 44.67
- task:
type: Clustering
dataset:
type: mteb/RedditClusteringP2P
name: MTEB RedditClusteringP2P
config: default
split: test
revision: 385e3cb46b4cfa89021f56c4380204149d0efe33
metrics:
- type: v_measure
value: 53.67
- task:
type: Retrieval
dataset:
type: mteb/SCIDOCS
name: MTEB SCIDOCS
config: default
split: test
revision: f8c2fcf00f625baaa80f62ec5bd9e1fff3b8ae88
metrics:
- type: ndcg_at_10
value: 16.37
- task:
type: STS
dataset:
type: mteb/SICK-R
name: MTEB SICK-R
config: default
split: test
revision: 20a6d6f312dd54037fe07a32d58e5e168867909d
metrics:
- type: cosine_spearman
value: 79.81
- task:
type: STS
dataset:
type: mteb/STS12
name: MTEB STS12
config: default
split: test
revision: a0d554a64d88156834ff5ae9920b964011b16384
metrics:
- type: cosine_spearman
value: 76.03
- task:
type: STS
dataset:
type: mteb/STS13
name: MTEB STS13
config: default
split: test
revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca
metrics:
- type: cosine_spearman
value: 85.05
- task:
type: STS
dataset:
type: mteb/STS14
name: MTEB STS14
config: default
split: test
revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375
metrics:
- type: cosine_spearman
value: 80.97
- task:
type: STS
dataset:
type: mteb/STS15
name: MTEB STS15
config: default
split: test
revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3
metrics:
- type: cosine_spearman
value: 86.88
- task:
type: STS
dataset:
type: mteb/STS16
name: MTEB STS16
config: default
split: test
revision: 4d8694f8f0e0100860b497b999b3dbed754a0513
metrics:
- type: cosine_spearman
value: 83.3
- task:
type: STS
dataset:
type: mteb/STSBenchmark
name: MTEB STSBenchmark
config: default
split: test
revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831
metrics:
- type: cosine_spearman
value: 86.49
- task:
type: Reranking
dataset:
type: mteb/SciDocsRR
name: MTEB SciDocsRR
config: default
split: test
revision: 39b8377811871075eed9de3b8a7e21aaa6acb3d8
metrics:
- type: map
value: 74.1
- task:
type: Retrieval
dataset:
type: mteb/SciFact
name: MTEB SciFact
config: default
split: test
revision: d56462d0e63a25450459c4f213e49ffdb866f7f9
metrics:
- type: ndcg_at_10
value: 59.42
- task:
type: PairClassification
dataset:
type: mteb/SprintDuplicateQuestions
name: MTEB SprintDuplicateQuestions
config: default
split: test
revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46
metrics:
- type: cosine_ap
value: 94.91
- task:
type: Clustering
dataset:
type: mteb/StackExchangeClustering
name: MTEB StackExchangeClustering
config: default
split: test
revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259
metrics:
- type: v_measure
value: 52.04
- task:
type: Clustering
dataset:
type: mteb/StackExchangeClusteringP2P
name: MTEB StackExchangeClusteringP2P
config: default
split: test
revision: 815ca46b2622cec33ccafc3735d572c266efdb44
metrics:
- type: v_measure
value: 34.14
- task:
type: Reranking
dataset:
type: mteb/StackOverflowDupQuestions
name: MTEB StackOverflowDupQuestions
config: default
split: test
revision: 5debda000fe8e27ebb5c123d38081f92e1847a59
metrics:
- type: map
value: 43.53
- task:
type: Summarization
dataset:
type: mteb/SummEval
name: MTEB SummEval
config: default
split: test
revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c
metrics:
- type: cosine_spearman
value: 29.73
- task:
type: Retrieval
dataset:
type: mteb/TRECCOVID
name: MTEB TRECCOVID
config: default
split: test
revision: bb9466bac8153a0349341eb1b22e06409e78ef4e
metrics:
- type: ndcg_at_10
value: 67.01
- task:
type: Retrieval
dataset:
type: mteb/Touche2020
name: MTEB Touche2020
config: default
split: test
revision: a34f9a33db75fa0cbb21bb5cfc3dae8dc8bec93f
metrics:
- type: ndcg_at_10
value: 28.58
- task:
type: Classification
dataset:
type: mteb/ToxicConversationsClassification
name: MTEB ToxicConversationsClassification
config: default
split: test
revision: edfaf9da55d3dd50d43143d90c1ac476895ae6de
metrics:
- type: accuracy
value: 66.23
- task:
type: Classification
dataset:
type: mteb/TweetSentimentExtractionClassification
name: MTEB TweetSentimentExtractionClassification
config: default
split: test
revision: d604517c81ca91fe16a244d1248fc021f9ecee7a
metrics:
- type: accuracy
value: 62.04
- task:
type: Clustering
dataset:
type: mteb/TwentyNewsgroupsClustering
name: MTEB TwentyNewsgroupsClustering
config: default
split: test
revision: 6125ec4e24fa026cec8a478383ee943acfbd5449
metrics:
- type: v_measure
value: 41.63
- task:
type: PairClassification
dataset:
type: mteb/TwitterSemEval2015
name: MTEB TwitterSemEval2015
config: default
split: test
revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1
metrics:
- type: cosine_ap
value: 70.79
- task:
type: PairClassification
dataset:
type: mteb/TwitterURLCorpus
name: MTEB TwitterURLCorpus
config: default
split: test
revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf
metrics:
- type: cosine_ap
value: 85.5
---
# ogma-base
**13.32M parameter text embedding model** by [Axiotic AI](https://axiotic.ai), achieving **56.54 average** on MTEB English (54/54 tasks).
12-layer transformer, 256 hidden dim, mean pooling — strong general-purpose model.
## Highlights
- **56.54 MTEB average** — outperforms Potion-32M (51.22) by +5.32 points at 2.4x fewer parameters
- **Matryoshka embeddings** — dimensions [32, 64, 128, 256] for flexible storage/compute tradeoffs
- **Asymmetric encoding** — dedicated `[QRY]`, `[DOC]`, `[SYM]` task tokens
- **1024 token context** — handles longer passages than typical small models
- **HuggingFace Hub** — load directly, no local package installation needed
## Quick Start
```python
import torch
from huggingface_hub import snapshot_download
import sys, yaml
# Download model from HuggingFace
model_path = snapshot_download("axiotic/ogma-base")
sys.path.insert(0, model_path)
from ogma_model import OgmaModel
from config import OgmaConfig, TaskToken
from tokenizer import OgmaTokenizer
# Load model
with open(f"{model_path}/config.yaml") as f:
cfg = yaml.safe_load(f)
config = OgmaConfig.from_dict(cfg)
model = OgmaModel(config)
state = torch.load(f"{model_path}/model.pt", map_location="cpu", weights_only=True)
model.load_state_dict(state)
model.eval()
# Load tokenizer
tokenizer = OgmaTokenizer(f"{model_path}/tokenizer.json")
# Encode text
sentences = ["The quick brown fox", "A fast auburn canine"]
enc = tokenizer.batch_encode(sentences, max_length=1024)
ids = torch.tensor(enc["input_ids"])
mask = torch.tensor(enc["attention_mask"])
with torch.no_grad():
embs = model.encode(ids, mask, task=TaskToken.SYM)
# Cosine similarity
sim = torch.nn.functional.cosine_similarity(embs[0], embs[1], dim=0)
print(f"Similarity: {sim.item():.4f}")
print(f"Shape: {embs.shape}") # (2, 256)
```
## Retrieval (Asymmetric Encoding)
```python
queries = ["What is machine learning?"]
documents = ["ML is a subset of AI...", "The weather is sunny today"]
q_enc = tokenizer.batch_encode(queries, max_length=1024)
d_enc = tokenizer.batch_encode(documents, max_length=1024)
with torch.no_grad():
q_embs = model.encode(torch.tensor(q_enc["input_ids"]),
torch.tensor(q_enc["attention_mask"]), task=TaskToken.QRY)
d_embs = model.encode(torch.tensor(d_enc["input_ids"]),
torch.tensor(d_enc["attention_mask"]), task=TaskToken.DOC)
scores = q_embs @ d_embs.T
print(f"Relevance scores: {scores}")
```
## Matryoshka Dimensionality Reduction
```python
full = model.encode(ids, mask, task=TaskToken.SYM) # (256d)
small = torch.nn.functional.normalize(full[:, :32], p=2, dim=-1) # (32d)
```
## Architecture
| Component | Details |
|-----------|---------|
| Parameters | 13.32M |
| Layers | 12 |
| Hidden dim | 256 |
| Output dim | 256 |
| Heads | 4 |
| Max seq len | 1024 |
| Matryoshka | [32, 64, 128, 256] |
| Pooling | Mean |
| Positional | RoPE |
| FFN | SwiGLU |
| Tokenizer | SentencePiece Unigram (30K) |
## MTEB Results (54/54 tasks)
| Category | ogma-base | Potion-32M | Potion-8M | vs P-32M |
|----------|------------|------------|-----------|----------|
| Classification | 67.7 | 66.0 | 64.5 | +1.7 |
| Clustering | 41.5 | 39.2 | 36.9 | +2.3 |
| PairClassification | 83.7 | 78.2 | 76.6 | +5.5 |
| Reranking | 51.3 | 50.9 | 49.7 | +0.4 |
| Retrieval | 42.8 | 32.2 | 30.4 | +10.6 |
| STS | 82.8 | 73.9 | 72.9 | +8.9 |
| Summarization | 29.7 | 29.8 | 29.3 | -0.1 |
| **Overall** | **56.54** | **51.22** | **49.58** | **+5.32** |
> Potion scores are locally reproduced using the same eval pipeline for fair comparison.
## Ogma Model Family
| Model | Params | MTEB-54 | Best For |
|-------|--------|---------|----------|
| [ogma-large](https://huggingface.co/axiotic/ogma-large) | 32.37M | 57.38 | Maximum quality |
| [ogma-base](https://huggingface.co/axiotic/ogma-base) | 13.32M | 56.54 | General purpose |
| [ogma-small](https://huggingface.co/axiotic/ogma-small) | 8.60M | 55.79 | Best sub-10M |
| [ogma-mini](https://huggingface.co/axiotic/ogma-mini) | 3.51M | 51.42 | Edge deployment |
| [ogma-micro](https://huggingface.co/axiotic/ogma-micro) | 2.32M | 49.77 | Extreme edge |
## License
MIT
|