diff --git a/crates/embed/tests/embed_parity_vs_hf.rs b/crates/embed/tests/embed_parity_vs_hf.rs index ae9b2539..075b23b1 100644 --- a/crates/embed/tests/embed_parity_vs_hf.rs +++ b/crates/embed/tests/embed_parity_vs_hf.rs @@ -286,6 +286,158 @@ async fn e5_small_parity_vs_hf() { ); } +// --------------------------------------------------------------------------- +// all-MiniLM-L6-v2 parity test +// --------------------------------------------------------------------------- + +#[tokio::test] +async fn all_minilm_l6_v2_parity_vs_hf() { + let Some(goldens) = load_fixture("all_minilm_l6_v2.json") else { + return; + }; + + let model_dir = + PathBuf::from(std::env::var("HOME").unwrap()).join(".lattice/models/all-minilm-l6-v2"); + if !model_dir.join("model.safetensors").exists() { + eprintln!( + "SKIP all_minilm_l6_v2_parity_vs_hf: model weights not found at {}", + model_dir.display() + ); + return; + } + + let model = EmbeddingModel::AllMiniLmL6V2; + let service = NativeEmbeddingService::with_model(model); + + let mut failures = 0; + let mut min_cos = 1.0_f64; + let mut max_diff = 0.0_f64; + + for golden in &goldens { + // Golden was generated without any prompt prefix (MiniLM has none). + assert_eq!( + golden.prompt_prefix, "", + "all-MiniLM-L6-v2 golden must have empty prompt_prefix; got {:?}", + golden.prompt_prefix + ); + let lattice_vec = embed_text(&service, &golden.input, model).await; + + assert_eq!( + lattice_vec.len(), + golden.embedding_dim, + "all-MiniLM-L6-v2 dimension mismatch: got {}, want {}", + lattice_vec.len(), + golden.embedding_dim + ); + + let cos = cosine_sim(&lattice_vec, &golden.embedding); + let diff = max_abs_diff(&lattice_vec, &golden.embedding); + min_cos = min_cos.min(cos); + max_diff = max_diff.max(diff); + + if cos < COS_SIM_MIN_F32 { + failures += 1; + eprintln!( + "PARITY FAIL [all-minilm-l6] input={:?}\n cosine={:.6} (need ≥ {COS_SIM_MIN_F32})\n max_abs_diff={diff:.2e}\n pooling={}, prompt_prefix={}", + golden.input, cos, golden.pooling, golden.prompt_prefix, + ); + } else { + println!( + " [all-minilm-l6] '{:.40}' cosine={:.6} max_diff={:.2e}", + golden.input, cos, diff + ); + } + } + + println!( + "[all-minilm-l6] aggregate: min_cosine={min_cos:.6} max_abs_diff={max_diff:.2e} failures={failures}/{}", + goldens.len() + ); + + assert_eq!( + failures, + 0, + "[all-minilm-l6] {failures}/{} parity checks failed — see stderr", + goldens.len() + ); +} + +// --------------------------------------------------------------------------- +// paraphrase-multilingual-MiniLM-L12-v2 parity test +// --------------------------------------------------------------------------- + +#[tokio::test] +async fn paraphrase_multilingual_minilm_l12_v2_parity_vs_hf() { + let Some(goldens) = load_fixture("paraphrase_multilingual_minilm_l12_v2.json") else { + return; + }; + + let model_dir = PathBuf::from(std::env::var("HOME").unwrap()) + .join(".lattice/models/paraphrase-multilingual-minilm-l12-v2"); + if !model_dir.join("model.safetensors").exists() { + eprintln!( + "SKIP paraphrase_multilingual_minilm_l12_v2_parity_vs_hf: model weights not found at {}", + model_dir.display() + ); + return; + } + + let model = EmbeddingModel::ParaphraseMultilingualMiniLmL12V2; + let service = NativeEmbeddingService::with_model(model); + + let mut failures = 0; + let mut min_cos = 1.0_f64; + let mut max_diff = 0.0_f64; + + for golden in &goldens { + // Golden was generated without any prompt prefix (paraphrase-multilingual has none). + assert_eq!( + golden.prompt_prefix, "", + "paraphrase-multilingual golden must have empty prompt_prefix; got {:?}", + golden.prompt_prefix + ); + let lattice_vec = embed_text(&service, &golden.input, model).await; + + assert_eq!( + lattice_vec.len(), + golden.embedding_dim, + "paraphrase-multilingual dimension mismatch: got {}, want {}", + lattice_vec.len(), + golden.embedding_dim + ); + + let cos = cosine_sim(&lattice_vec, &golden.embedding); + let diff = max_abs_diff(&lattice_vec, &golden.embedding); + min_cos = min_cos.min(cos); + max_diff = max_diff.max(diff); + + if cos < COS_SIM_MIN_F32 { + failures += 1; + eprintln!( + "PARITY FAIL [paraphrase-multilingual-minilm-l12] input={:?}\n cosine={:.6} (need ≥ {COS_SIM_MIN_F32})\n max_abs_diff={diff:.2e}\n pooling={}, prompt_prefix={}", + golden.input, cos, golden.pooling, golden.prompt_prefix, + ); + } else { + println!( + " [paraphrase-multilingual-minilm-l12] '{:.40}' cosine={:.6} max_diff={:.2e}", + golden.input, cos, diff + ); + } + } + + println!( + "[paraphrase-multilingual-minilm-l12] aggregate: min_cosine={min_cos:.6} max_abs_diff={max_diff:.2e} failures={failures}/{}", + goldens.len() + ); + + assert_eq!( + failures, + 0, + "[paraphrase-multilingual-minilm-l12] {failures}/{} parity checks failed — see stderr", + goldens.len() + ); +} + // --------------------------------------------------------------------------- // Qwen3-Embedding-0.6B parity test // --------------------------------------------------------------------------- diff --git a/crates/embed/tests/fixtures/embed_parity_v1/all_minilm_l6_v2.json b/crates/embed/tests/fixtures/embed_parity_v1/all_minilm_l6_v2.json new file mode 100644 index 00000000..f15f69a4 --- /dev/null +++ b/crates/embed/tests/fixtures/embed_parity_v1/all_minilm_l6_v2.json @@ -0,0 +1,2030 @@ +[ + { + "model_id": "sentence-transformers/all-MiniLM-L6-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "The quick brown fox jumps over the lazy dog.", + "input_ids": [ + 101, + 1996, + 4248, + 2829, + 4419, + 14523, + 2058, + 1996, + 13971, + 3899, + 1012, + 102 + ], + "embedding": [ + 0.043933525681495667, + 0.05893439054489136, + 0.04817836359143257, + 0.07754816859960556, + 0.026744341477751732, + -0.03762957081198692, + -0.002605112036690116, + -0.05994304269552231, + -0.0024960776790976524, + 0.022072825580835342, + 0.04802589491009712, + 0.05575532093644142, + -0.03894538804888725, + -0.02661677822470665, + 0.007693449500948191, + -0.02623767778277397, + -0.03641606122255325, + -0.03781617432832718, + 0.07407816499471664, + -0.049505069851875305, + -0.05852172151207924, + -0.0636197105050087, + 0.03243498131632805, + 0.02200852520763874, + -0.07106377184391022, + -0.033157747238874435, + -0.06941043585538864, + -0.05003742501139641, + 0.07462679594755173, + -0.11113378405570984, + -0.012306410819292068, + 0.03774565830826759, + -0.02803133614361286, + 0.014535349793732166, + -0.031558554619550705, + -0.08058356493711472, + 0.05835260823369026, + 0.0025900781620293856, + 0.03928022459149361, + 0.025769583880901337, + 0.04985055699944496, + -0.0017561978893354535, + -0.04552967846393585, + 0.02926081418991089, + -0.10201728343963623, + 0.05222871154546738, + -0.07908999174833298, + -0.010285772383213043, + 0.009202430956065655, + 0.013073226436972618, + -0.04047774523496628, + -0.027792589738965034, + 0.01246678363531828, + 0.06728337705135345, + 0.06812473386526108, + -0.007571214810013771, + -0.0060995048843324184, + -0.042377691715955734, + 0.051781538873910904, + -0.015670720487833023, + 0.00956358015537262, + 0.04123901575803757, + 0.021495966240763664, + 0.010429387912154198, + 0.027334898710250854, + 0.018706222996115685, + -0.02696077898144722, + -0.07005421817302704, + -0.10470055043697357, + -0.0018987563671544194, + 0.01770167425274849, + -0.05747246369719505, + -0.014422353357076645, + 0.00047051679575815797, + 0.0023323202040046453, + -0.02519204653799534, + 0.049300432205200195, + -0.05096101015806198, + 0.06319834291934967, + 0.014916492626070976, + -0.027076667174696922, + -0.04528753459453583, + -0.049059443175792694, + 0.037494074553251266, + 0.03845803812146187, + 0.0015690132277086377, + 0.030992208048701286, + 0.020163001492619514, + -0.012436280958354473, + -0.030671952292323112, + -0.02788187377154827, + -0.06891822069883347, + -0.05136770009994507, + 0.021479640156030655, + 0.011574599891901016, + 0.0012540904572233558, + 0.018876604735851288, + -0.04423185810446739, + -0.04498176649212837, + -0.0034187056589871645, + 0.013113162480294704, + 0.02000991813838482, + 0.12109975516796112, + 0.023107511922717094, + -0.022015923634171486, + -0.03288473188877106, + -0.0031550952699035406, + 0.0001178800011985004, + 0.09914982318878174, + 0.01652391254901886, + -0.00469672167673707, + -0.014536634087562561, + -0.0037107348907738924, + 0.09651364386081696, + 0.028590848669409752, + 0.02134820818901062, + -0.07176455855369568, + -0.024114178493618965, + -0.04409409686923027, + -0.10734691470861435, + 0.06799453496932983, + 0.13046672940254211, + -0.07970298826694489, + 0.00679508363828063, + -0.02375115640461445, + -0.04616367444396019, + -0.029965084046125412, + -3.694099363344505e-33, + 0.07309690862894058, + -0.02201715111732483, + -0.08614647388458252, + -0.07143794000148773, + -0.06367418169975281, + -0.07218633592128754, + -0.005930423736572266, + -0.023364147171378136, + -0.028365837410092354, + 0.04774349555373192, + -0.08061757683753967, + -0.0015647411346435547, + 0.013844345696270466, + -0.028623569756746292, + -0.033538613468408585, + -0.1137775257229805, + -0.009176413528621197, + -0.010810079984366894, + 0.032319605350494385, + 0.05883806571364403, + 0.033420875668525696, + 0.1079879179596901, + -0.03727126494050026, + -0.029677079990506172, + 0.05171901732683182, + -0.022533826529979706, + -0.06960912048816681, + -0.02144755609333515, + -0.02334107831120491, + 0.048219937831163406, + -0.03587661311030388, + -0.04689908027648926, + -0.03978739306330681, + 0.1108131930232048, + -0.014300752431154251, + -0.11846446990966797, + 0.05829153209924698, + -0.06258895993232727, + -0.02940409444272518, + 0.06032387912273407, + -0.0024441357236355543, + 0.016011564061045647, + 0.026723360642790794, + 0.024953071027994156, + -0.06493188440799713, + -0.010680162347853184, + 0.02814650721848011, + 0.010356387123465538, + -0.0006636271136812866, + 0.019818592816591263, + -0.03042885847389698, + 0.0062842522747814655, + 0.051526788622140884, + -0.04753754660487175, + -0.06444212794303894, + 0.09550321102142334, + 0.07558580487966537, + -0.028157493099570274, + -0.03499658778309822, + 0.10181640088558197, + 0.019873321056365967, + -0.03680366650223732, + 0.0029352742712944746, + -0.05007454752922058, + 0.15093205869197845, + -0.06160800904035568, + -0.08588126301765442, + 0.007139852270483971, + -0.013306579552590847, + 0.07804057747125626, + 0.017525097355246544, + 0.04212795943021774, + 0.035793937742710114, + -0.13295044004917145, + 0.03569706901907921, + -0.02031167596578598, + 0.01249102596193552, + -0.03803551569581032, + 0.04915428161621094, + -0.01565409265458584, + 0.12141826003789902, + -0.08086448907852173, + -0.04687817767262459, + 0.041084274649620056, + -0.01843186281621456, + 0.06696903705596924, + 0.004335928708314896, + 0.02273150160908699, + -0.013642891310155392, + -0.045323893427848816, + -0.03928292915225029, + -0.006298878230154514, + 0.05296102911233902, + -0.03690648823976517, + 0.07116765528917313, + 2.3334317751600826e-33, + 0.1052313968539238, + -0.04818739742040634, + 0.0695919394493103, + 0.06569763273000717, + -0.046514902263879776, + 0.051449209451675415, + -0.012447556480765343, + 0.03208720684051514, + -0.09233565628528595, + 0.05009327083826065, + -0.03288767859339714, + 0.013913877308368683, + -0.0008702519698999822, + -0.00490909069776535, + 0.10394638031721115, + 0.00032164392177946866, + 0.052811041474342346, + -0.011799058876931667, + 0.023156622424721718, + 0.01317677740007639, + -0.052596285939216614, + 0.032670263200998306, + 0.0003086467331741005, + 0.06411291658878326, + 0.038850028067827225, + 0.05880086123943329, + 0.08297934383153915, + -0.018814971670508385, + -0.022637758404016495, + -0.10047367960214615, + -0.03837530314922333, + -0.058808185160160065, + 0.001824211678467691, + -0.04269953444600105, + 0.02501947060227394, + 0.0640060305595398, + -0.037748273462057114, + -0.0068390751257538795, + -0.0025460408069193363, + -0.09760433435440063, + 0.01884758099913597, + -0.0008831877494230866, + 0.017361152917146683, + 0.07107911258935928, + 0.03303929418325424, + 0.006934250704944134, + -0.05605238303542137, + 0.051463451236486435, + -0.04295419901609421, + 0.046007756143808365, + -0.008788268081843853, + 0.031728941947221756, + 0.04939655214548111, + 0.02951902151107788, + -0.050519250333309174, + -0.05431866645812988, + 0.00014994482626207173, + -0.027661429718136787, + 0.034687869250774384, + -0.021088948473334312, + 0.013806010596454144, + 0.029988709837198257, + 0.013974443078041077, + -0.0042647416703403, + -0.015033735893666744, + -0.08760958164930344, + -0.06850540637969971, + -0.042814139276742935, + 0.07769447565078735, + -0.07102852314710617, + -0.007376914378255606, + 0.021372659131884575, + 0.013556268066167831, + -0.07904646545648575, + 0.005476648453623056, + 0.08306629210710526, + 0.11414803564548492, + 0.0018075680127367377, + 0.0875491127371788, + -0.04160451143980026, + 0.015541577711701393, + -0.010120666585862637, + -0.007324338890612125, + 0.010796668007969856, + -0.06628169864416122, + 0.039841458201408386, + -0.11671154201030731, + 0.06429936736822128, + 0.04029202461242676, + -0.06547411531209946, + 0.01950531266629696, + 0.08099962025880814, + 0.053646329790353775, + 0.07679697871208191, + -0.013485196977853775, + -1.769190483003058e-08, + -0.044393524527549744, + 0.009206384420394897, + -0.08795905113220215, + 0.042692169547080994, + 0.07313649356365204, + 0.016842711716890335, + -0.04032626748085022, + 0.018513157963752747, + 0.08441724628210068, + -0.037447694689035416, + 0.030299624428153038, + 0.029064159840345383, + 0.06368782371282578, + 0.02897503413259983, + -0.014726980589330196, + 0.017754295840859413, + -0.033689577132463455, + 0.017316153272986412, + 0.03378751128911972, + 0.17682607471942902, + -0.017553361132740974, + -0.060307763516902924, + -0.014339442364871502, + -0.02385370433330536, + -0.044553082436323166, + -0.028985057026147842, + -0.0896776095032692, + -0.0017593341181054711, + -0.026148570701479912, + 0.005939995404332876, + -0.05183558166027069, + 0.08572797477245331, + -0.08183982223272324, + 0.008354369550943375, + 0.04007899388670921, + 0.04177641496062279, + 0.10457349568605423, + -0.0028656695503741503, + 0.019669124856591225, + 0.0058104973286390305, + 0.013325371779501438, + 0.045100126415491104, + -0.02175874635577202, + -0.013949311338365078, + -0.06869927048683167, + -0.0029410775750875473, + -0.031076520681381226, + -0.10585445165634155, + 0.06916247308254242, + -0.042411427944898605, + -0.04676822945475578, + -0.03647511824965477, + 0.04504001513123512, + 0.06098167598247528, + -0.0656561553478241, + -0.005456398241221905, + -0.018622709438204765, + -0.06314843147993088, + -0.03874368220567703, + 0.034673482179641724, + 0.05554576590657234, + 0.05216279253363609, + 0.056106582283973694, + 0.10206393152475357 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/all-MiniLM-L6-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "Pure Rust transformer inference engine.", + "input_ids": [ + 101, + 5760, + 18399, + 10938, + 2121, + 28937, + 3194, + 1012, + 102 + ], + "embedding": [ + -0.20266574621200562, + 0.039245810359716415, + 0.02470441535115242, + 0.05000293627381325, + 0.03131818771362305, + -0.04354971647262573, + -0.034473251551389694, + 0.07754441350698471, + -0.05513349547982216, + -0.08280116319656372, + -0.05644737184047699, + -0.039303649216890335, + 0.061159078031778336, + 0.015266460366547108, + -0.047081317752599716, + 0.05819876864552498, + -0.07069890946149826, + 0.05274895951151848, + -0.04520739987492561, + -0.13718931376934052, + -0.020177358761429787, + 0.05455233156681061, + -0.03581301495432854, + -0.051678720861673355, + 0.0894550010561943, + 0.034603048115968704, + 0.0401453971862793, + 0.013866021297872066, + 0.007527138106524944, + -0.04736434295773506, + -0.02242644503712654, + 0.028483286499977112, + -0.05778883025050163, + -0.04497596621513367, + 0.0449715182185173, + 0.05330227315425873, + -0.0309569351375103, + -0.02093333750963211, + -0.0687846913933754, + 0.04086713120341301, + -0.020740758627653122, + -0.0006837903056293726, + 0.0021282897796481848, + -0.004158183932304382, + 0.0647994726896286, + 0.05490716174244881, + 0.0756116583943367, + -0.01571805588901043, + -0.00404374347999692, + -0.039342984557151794, + -0.01620928756892681, + -0.014078596606850624, + 0.006488127168267965, + 0.03880634158849716, + 0.01163877546787262, + -0.023086098954081535, + 0.05259212106466293, + -0.07312449812889099, + -0.027724463492631912, + -0.04293062165379524, + 0.022936154156923294, + -0.01853090710937977, + -0.0119345523416996, + -0.01680358685553074, + 0.009530226700007915, + 0.055863600224256516, + 0.06200604513287544, + 0.03439437225461006, + -0.038982659578323364, + -0.11257527768611908, + -0.0462174154818058, + 0.015603180974721909, + -0.10716979205608368, + 0.044966619461774826, + 0.004679115489125252, + 0.04448600858449936, + 0.03990725427865982, + -0.05195395275950432, + 0.04431375861167908, + -0.04431929811835289, + -0.02975033037364483, + -0.013227486982941628, + -0.06834699213504791, + -0.0629676952958107, + 0.06758380681276321, + 0.08258534967899323, + -0.05625835061073303, + -0.011778688989579678, + 0.005321798380464315, + 0.09675037115812302, + -0.007344421464949846, + -0.07633327692747116, + -0.044010959565639496, + 0.018659867346286774, + 0.024386487901210785, + 0.08548948913812637, + 0.017811845988035202, + 0.013537729158997536, + -0.01774362474679947, + 0.09158608317375183, + -0.017727777361869812, + -0.035924140363931656, + 0.013975472189486027, + -0.08389514684677124, + -0.02806754596531391, + -0.014109226875007153, + 0.03915359079837799, + 0.055791426450014114, + -0.0163985975086689, + -0.01333802193403244, + 0.057771045714616776, + -0.028583277016878128, + -0.0340658500790596, + -0.03240843862295151, + 0.022565092891454697, + -0.09000524133443832, + 0.007637843955308199, + 0.0423993282020092, + -0.026900166645646095, + 0.033643659204244614, + 0.09933310747146606, + 0.0923554077744484, + -0.06486121565103531, + 0.08594275265932083, + 0.06942121684551239, + 0.00993975717574358, + -0.03275378420948982, + -6.8800839467063834e-34, + -0.01061534509062767, + -0.018480533733963966, + 0.037983790040016174, + 0.08482243865728378, + -0.03277517855167389, + 0.032667119055986404, + 0.03167867660522461, + 0.043016642332077026, + 0.015775082632899284, + 0.05419643223285675, + -0.07289577275514603, + 0.0881200060248375, + -0.0371796153485775, + -0.07956075668334961, + -0.008719034492969513, + -0.06171949580311775, + 0.009308209642767906, + 0.034697726368904114, + 0.013419317081570625, + -0.00442227628082037, + 0.09093654900789261, + 0.05342617258429527, + -0.009677372872829437, + -0.043468449264764786, + -0.07203393429517746, + -0.06573173403739929, + 0.02248232066631317, + -0.09077956527471542, + -0.048643287271261215, + 0.0013230699114501476, + -0.045990411192178726, + 0.016336733475327492, + -0.06175290793180466, + 0.047137100249528885, + 0.07604697346687317, + -0.09147787094116211, + 0.0005788903799839318, + -0.05896488204598427, + -0.061400629580020905, + -0.046094272285699844, + -0.03941217064857483, + 0.01676788739860058, + -0.02148379571735859, + 0.018534108996391296, + 0.04662824794650078, + -0.07238505035638809, + 0.0046812258660793304, + 0.011738399043679237, + 0.04677174985408783, + -0.030664166435599327, + 0.01536586880683899, + 0.05536191165447235, + -0.007195133715867996, + 0.051902446895837784, + 0.10988526046276093, + 0.06905689090490341, + 0.04308789223432541, + -0.0025645610876381397, + 0.07290136814117432, + 0.10386770963668823, + -0.07657945901155472, + 0.10981158167123795, + -0.06050529330968857, + -0.06956390291452408, + 0.013427749276161194, + -0.029805254191160202, + -0.05241444706916809, + 0.008001646026968956, + -0.045413848012685776, + 0.06606299430131912, + 0.0005985142779536545, + -0.02061653323471546, + -0.002299260813742876, + -0.007530288305133581, + -0.003478788770735264, + -0.029946601018309593, + 0.023450296372175217, + 0.04830634966492653, + 0.005592716857790947, + -0.0704600065946579, + -0.08276703953742981, + -0.003519293386489153, + 0.0032555938232690096, + 0.04052262380719185, + -0.005489948205649853, + 0.09849423170089722, + -0.00839942041784525, + -0.038818132132291794, + -0.07022513449192047, + -0.040312062948942184, + 0.0031066290102899075, + 0.02394612692296505, + -0.0008830078295432031, + -0.07046044617891312, + 0.017274880781769753, + 7.96946874455613e-34, + 0.01701466180384159, + 0.029683023691177368, + -0.03032323531806469, + 0.07641424983739853, + -0.059932198375463486, + -0.0646020844578743, + -0.03901783376932144, + 0.033762212842702866, + -0.025796519592404366, + -0.015617557801306248, + -0.012782393954694271, + 0.012036584317684174, + 0.04365759342908859, + -0.010837105102837086, + 0.07673759758472443, + 0.013215763494372368, + 0.013272407464683056, + -0.039846017956733704, + -0.008328552357852459, + 0.050675682723522186, + -0.04632041975855827, + 0.09461940824985504, + -0.07918696105480194, + -0.03200480341911316, + -0.06841452419757843, + 0.036650288850069046, + -0.10493272542953491, + 0.03811994940042496, + 0.02996342070400715, + 0.08048824965953827, + -0.04816671833395958, + -0.04180728644132614, + 0.015596735291182995, + -0.0016396553255617619, + -0.02006792090833187, + -0.03853122889995575, + 0.038013916462659836, + 0.03980515897274017, + -0.014553460292518139, + 0.007879944518208504, + 0.06630970537662506, + -0.05084474757313728, + -0.10890962928533554, + 0.07258444279432297, + -0.0922720655798912, + 0.0676753968000412, + 0.013300272636115551, + -0.007781102787703276, + 0.03501429781317711, + 0.01749785989522934, + 0.061390917748212814, + 0.04397980123758316, + -0.05270061641931534, + 0.01433856226503849, + -0.011528787203133106, + -0.0983431488275528, + 0.019951507449150085, + -0.06463036686182022, + 0.03470395877957344, + 0.04060041159391403, + 0.03560863807797432, + -0.021559014916419983, + 0.0696183443069458, + -0.041242871433496475, + -0.010038087144494057, + -0.029219258576631546, + -0.004994177725166082, + 0.0038783596828579903, + 0.014666367322206497, + 0.04707938805222511, + 0.11227960884571075, + 0.0007389598176814616, + 0.052364084869623184, + -0.05306859686970711, + 0.022883817553520203, + -0.05009026452898979, + 0.044890448451042175, + -0.03175928071141243, + 0.011924496851861477, + 0.02596728317439556, + -0.06927173584699631, + -0.02815343625843525, + 0.004133468493819237, + 0.026361865922808647, + 0.07509591430425644, + -0.03533315286040306, + 0.02511504478752613, + -0.0029865081887692213, + 0.09442232549190521, + 0.0383993536233902, + -0.04195721447467804, + 0.04184556379914284, + 0.022148897871375084, + 0.06163753196597099, + -0.05438850820064545, + -1.4503621414974077e-08, + -0.017815813422203064, + 0.0008000597590580583, + -0.007398827932775021, + 0.011881805025041103, + 0.022652465850114822, + 0.03492297604680061, + 0.0035529693122953176, + 0.013414688408374786, + -0.042972370982170105, + 0.010452483780682087, + 0.08043060451745987, + -0.030829302966594696, + -0.03026597574353218, + -0.01761026866734028, + 0.0768120065331459, + 0.0948006808757782, + 0.031033597886562347, + 0.03141232579946518, + -0.06487374007701874, + -0.06165154650807381, + 0.010204780846834183, + 0.055300433188676834, + -0.06899246573448181, + 0.009469645097851753, + 0.0011917968513444066, + -0.00631143432110548, + 0.023983072489500046, + -0.0005570528446696699, + 0.08740200847387314, + 0.07309495657682419, + -0.003018184332177043, + 0.025113601237535477, + 0.010394920594990253, + 0.0222832802683115, + 0.05956391617655754, + 0.07428992539644241, + -0.03181254118680954, + 0.032375872135162354, + -0.0073473090305924416, + -0.059747304767370224, + -0.14330925047397614, + 0.04427603259682655, + -0.09606045484542847, + 0.027846718207001686, + 0.014053297229111195, + 0.03105032630264759, + 0.002984724473208189, + -0.1077665165066719, + -0.05929720029234886, + 0.04789188876748085, + 0.07093162834644318, + -0.060107629746198654, + 0.05509839951992035, + 0.10414066165685654, + -0.01969519816339016, + 0.10601185262203217, + 0.06157003343105316, + -0.10064397007226944, + -0.06541512161493301, + -0.0031250230967998505, + -0.01764589734375477, + 0.02900145947933197, + 0.01012393832206726, + 0.010705727152526379 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/all-MiniLM-L6-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "Café résumé naïve façade — Unicode test.", + "input_ids": [ + 101, + 7668, + 13746, + 15743, + 8508, + 1517, + 27260, + 3231, + 1012, + 102 + ], + "embedding": [ + 0.004435078240931034, + 0.010923382826149464, + 0.030192609876394272, + -0.007772432640194893, + -0.020510319620370865, + -0.011416417546570301, + -0.06515885144472122, + -0.07775755971670151, + -0.10289683938026428, + -0.04616285860538483, + 0.023354824632406235, + -0.08486183732748032, + 0.004045690875500441, + 0.002982386387884617, + 0.050139740109443665, + -0.10865187644958496, + 0.05341804027557373, + -0.0018888061167672276, + 0.05385131761431694, + 0.056019194424152374, + 0.010148805566132069, + -0.01670846901834011, + 0.01752077043056488, + -0.03124871291220188, + 0.06371182203292847, + 0.05669930577278137, + 0.03323964774608612, + -0.015756679698824883, + 0.10573267191648483, + -0.06119898334145546, + 0.015766892582178116, + 0.05349455028772354, + 0.07713514566421509, + 0.0012858364498242736, + 0.09169259667396545, + 0.12111154943704605, + 0.05479322001338005, + -0.02599692903459072, + 0.0032311100512742996, + 0.033275797963142395, + -0.07819696515798569, + -0.13075432181358337, + -0.036865491420030594, + -0.0035108609590679407, + 0.0951048955321312, + -0.0013488209806382656, + -0.028380276635289192, + 0.005285263992846012, + -0.01180183980613947, + -0.0731312483549118, + -0.08641435950994492, + -0.05820981040596962, + -0.012182731181383133, + -0.0594974048435688, + -0.02595839649438858, + 0.010835723020136356, + 0.021724607795476913, + -0.0021463665179908276, + -0.0009716532076708972, + 0.021976694464683533, + -0.04574371501803398, + -0.03659898042678833, + -0.027291007339954376, + 0.10184217244386673, + 0.0003565101942513138, + 0.07362546771764755, + -0.09642772376537323, + 0.0360582061111927, + -0.0017278081504628062, + -0.08053601533174515, + -0.027512572705745697, + -0.0495789535343647, + 0.00998180452734232, + 0.025355633348226547, + 0.02800954319536686, + 0.034485939890146255, + 0.05019726604223251, + -0.0817551240324974, + -0.02893473394215107, + -0.011878370307385921, + 0.0411759652197361, + -0.0301348976790905, + -0.05001341179013252, + 0.08140795677900314, + 0.04046585038304329, + 0.03282640129327774, + 0.02418341487646103, + -0.05242912098765373, + -0.05784817039966583, + 0.0337732695043087, + 0.05110294744372368, + -0.026870176196098328, + -0.03024677187204361, + 0.021613800898194313, + -0.07174466550350189, + -0.03728045895695686, + 0.018717359751462936, + 0.02929091639816761, + 0.022081399336457253, + 0.07196252048015594, + -0.05820425972342491, + -0.041197892278432846, + 0.011250336654484272, + -0.010033613070845604, + -0.07474969327449799, + -0.08390865474939346, + 0.035540007054805756, + -0.021032072603702545, + 0.0933445394039154, + -0.028885485604405403, + 0.015655329450964928, + -0.044933486729860306, + -0.08671549707651138, + -0.05464040860533714, + -0.02875390276312828, + -0.05314899608492851, + -0.020097697153687477, + -0.06572326272726059, + 0.04079735651612282, + 0.019740767776966095, + 0.05636121705174446, + 0.05144088715314865, + -0.009242245927453041, + -0.037791136652231216, + -0.06480415165424347, + -0.07032672315835953, + 0.04241882637143135, + -2.707585382213078e-33, + -0.005455303005874157, + 0.1263476014137268, + -0.0351567305624485, + 0.07525165379047394, + 0.10664534568786621, + -0.024100780487060547, + -0.03679202124476433, + 0.045703861862421036, + -0.00035565849975682795, + 0.037838879972696304, + 0.05478321388363838, + 0.04424520954489708, + -0.10032472759485245, + 0.09561707079410553, + 0.014839129522442818, + 0.07891332358121872, + 0.05201755464076996, + 0.04840875789523125, + -0.06077529489994049, + 0.006356886122375727, + 0.04241257533431053, + 0.03561505675315857, + 0.06664860248565674, + -0.03793438896536827, + -0.05285366624593735, + 0.014863500371575356, + 0.030607938766479492, + -0.0032969051972031593, + -0.035675421357154846, + 0.06467728316783905, + -0.009216681122779846, + -0.004969606641680002, + -0.013700533658266068, + 0.08744463324546814, + -0.10410995781421661, + 0.0018843706930056214, + -0.005096692591905594, + -0.06744120270013809, + -0.0034329984337091446, + 0.058587245643138885, + -0.12140899896621704, + 0.07845448702573776, + 0.04841323569417, + 0.029422007501125336, + -0.009589827619493008, + -0.0425485260784626, + 0.05730220675468445, + -0.017157334834337234, + -0.030929207801818848, + 0.022416453808546066, + 0.006537662353366613, + 0.026897849515080452, + -0.0539461225271225, + 0.08773865550756454, + -0.030424555763602257, + -0.06444952636957169, + 0.042028721421957016, + 0.05139760673046112, + -0.021517382934689522, + 8.537307439837605e-05, + 0.04593060165643692, + 0.05625305324792862, + -0.023165840655565262, + 0.05032351613044739, + -0.03139037638902664, + -0.03676801547408104, + -0.010967976413667202, + 0.008147087879478931, + 0.0773438960313797, + -0.014823530800640583, + 0.022970739752054214, + 0.022498605772852898, + -0.009196102619171143, + 0.019924728199839592, + -0.04688383638858795, + -0.03959072381258011, + 0.015486858785152435, + -0.01901787519454956, + 0.012254823930561543, + 0.03089098073542118, + 0.059913456439971924, + 0.053976185619831085, + 0.018208133056759834, + -0.09018222987651825, + -0.019728729501366615, + 0.04802565276622772, + 0.14400313794612885, + -0.040560655295848846, + -0.02035231702029705, + 0.0209245253354311, + -0.03918227180838585, + 0.016854291781783104, + 0.03767348825931549, + -0.01985817216336727, + 0.032731760293245316, + 2.2039743986330317e-33, + 0.09508363157510757, + -0.03433893248438835, + -0.04594467580318451, + 0.007672414183616638, + -0.06752556562423706, + -0.02236330509185791, + 0.072027787566185, + 0.04435630887746811, + -0.10889383405447006, + 0.008986339904367924, + 0.0023823457304388285, + 0.02353866770863533, + 0.05314677581191063, + 0.013686776161193848, + 0.003282297868281603, + 0.023334842175245285, + 0.044945020228624344, + -0.02134835161268711, + -0.07526694238185883, + 0.02453342080116272, + 0.003951251972466707, + -0.009115583263337612, + -0.09094618260860443, + 0.014782030135393143, + 0.0029057550709694624, + 0.08163408935070038, + -0.006788436323404312, + -0.04319588467478752, + -0.007592360954731703, + -0.030261671170592308, + -0.05445820093154907, + -0.01708352565765381, + -0.030086921527981758, + 0.08044201880693436, + -0.00585958594456315, + 0.08521819114685059, + -0.060371313244104385, + -0.013642366044223309, + -0.03167209401726723, + 0.10697637498378754, + 0.03542231768369675, + -0.03247224539518356, + -0.028037207201123238, + 0.07662675529718399, + 0.021718796342611313, + -0.0500640831887722, + -0.042129214853048325, + -0.0792631208896637, + -0.001175308134406805, + -0.03102744370698929, + 0.11242832988500595, + 0.02394011802971363, + -0.06872119754552841, + 0.004019582644104958, + -0.027669811621308327, + 0.007369302678853273, + -0.028129398822784424, + 0.009338702075183392, + -0.05171600356698036, + 0.02758009172976017, + 0.09092521667480469, + 0.011896278709173203, + -0.011038349010050297, + -0.02731401100754738, + 0.030331509187817574, + -0.05274638161063194, + 0.015879610553383827, + -0.02291985973715782, + -0.0354851670563221, + -0.08845144510269165, + 0.03268161416053772, + 0.041369225829839706, + -0.06414754688739777, + 0.0010178108932450414, + -0.06774909794330597, + -0.005790265742689371, + 0.0030411421321332455, + 0.029080593958497047, + -0.0022555298637598753, + 0.06002926453948021, + -0.07185029983520508, + -0.05554285645484924, + -0.030593348667025566, + 0.09022615849971771, + 0.054332803934812546, + -0.01590893231332302, + 0.00863935612142086, + 0.04560010880231857, + 0.05539395660161972, + 0.02023685723543167, + 0.001974784769117832, + 0.13162291049957275, + -0.0051458366215229034, + 0.04413305222988129, + 0.08901482820510864, + -1.5461374403002992e-08, + -0.04814859852194786, + -0.1108599379658699, + -0.026357663795351982, + 0.010327479802072048, + -0.07066597789525986, + -0.07104359567165375, + -0.025918977335095406, + -0.0861431360244751, + -0.02573239803314209, + -0.07036535441875458, + -0.0679204985499382, + 0.025845853611826897, + -0.09588529914617538, + 0.07395698130130768, + 0.029701223596930504, + 0.020685721188783646, + 0.0031024767085909843, + 0.11417295038700104, + -0.037749648094177246, + 0.036843299865722656, + 0.02513587847352028, + 0.040347300469875336, + 0.005538731347769499, + -0.027204787358641624, + -0.09349747747182846, + 0.019646426662802696, + -0.026791982352733612, + 0.06799118965864182, + -0.024098437279462814, + -0.03681161627173424, + 0.012559249997138977, + -0.03173568844795227, + -0.01803082413971424, + -0.0335082933306694, + 0.03154263272881508, + 0.10907904803752899, + 0.031205538660287857, + -0.02148596942424774, + -0.0018686038674786687, + 0.03334759920835495, + 0.04761664196848869, + -0.17690503597259521, + -0.015771642327308655, + 0.00035919976653531194, + 0.032042622566223145, + 0.0057267090305686, + 0.016812408342957497, + 0.01940489001572132, + -0.013848134316504002, + -0.0028215597849339247, + 0.02151675336062908, + -0.04805248603224754, + 0.015087554231286049, + 0.022217610850930214, + -0.0022431949619203806, + -0.02255576103925705, + 0.017880413681268692, + 0.01154575776308775, + 0.046920858323574066, + 0.06317611783742905, + 0.09762875735759735, + 0.06525656580924988, + -0.05664946511387825, + -0.01573025807738304 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/all-MiniLM-L6-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": " leading whitespace and multiple spaces ", + "input_ids": [ + 101, + 2877, + 12461, + 15327, + 1998, + 3674, + 7258, + 102 + ], + "embedding": [ + 0.04214216023683548, + 0.025248564779758453, + 0.08975216001272202, + 0.0019717728719115257, + -0.0250889640301466, + 0.05156303942203522, + 0.02955923229455948, + -0.010600143112242222, + 0.029313674196600914, + 0.01598503068089485, + -0.009018050506711006, + -0.015988612547516823, + 0.06721257418394089, + -0.04255992919206619, + -0.000674945767968893, + 0.0011747258249670267, + -0.05248602479696274, + 0.04691837728023529, + -0.1591612696647644, + 0.01575750857591629, + 0.06789098680019379, + 0.014754652976989746, + 0.01549096405506134, + -0.06605426222085953, + -0.018726537004113197, + 0.12097254395484924, + -0.025849437341094017, + 0.04753892496228218, + 0.01712239719927311, + 0.004632416646927595, + 0.07812045514583588, + -0.10267361253499985, + 0.13909277319908142, + -0.015971112996339798, + 0.05864526703953743, + -0.042195841670036316, + 0.04208579286932945, + -0.011605005711317062, + -0.054582033306360245, + 0.031243111938238144, + -0.04954436048865318, + -0.011986058205366135, + 0.06139199808239937, + 0.06355281919240952, + 0.006029278505593538, + 0.010726787149906158, + 0.0004405135114211589, + -0.06995649635791779, + 0.02981560118496418, + -0.07542435079813004, + -0.020122064277529716, + -0.010204654186964035, + -0.05545264482498169, + 0.06972640752792358, + 0.02654893882572651, + 0.0063897413201630116, + -0.01980404183268547, + 0.08301825821399689, + 0.035741984844207764, + -0.09907853603363037, + 0.035143136978149414, + 0.01058198418468237, + -0.028591584414243698, + 0.010065590031445026, + 0.04242231324315071, + -0.011419971473515034, + -0.10801371186971664, + 0.06940269470214844, + -0.08481205999851227, + 0.09257358312606812, + -0.02923160418868065, + 0.07250617444515228, + -0.040882308036088943, + 0.052990980446338654, + -0.04721682891249657, + 0.0811500996351242, + -0.023488445207476616, + 0.07396668940782547, + 0.09095612168312073, + 0.0039848461747169495, + 0.10901063680648804, + -0.022016381844878197, + -0.04162907972931862, + 0.0584157295525074, + -0.01713128760457039, + 0.03686492145061493, + -0.03777178004384041, + -0.058571454137563705, + -0.0896836519241333, + -0.09262368828058243, + 0.04190113767981529, + -0.0703027993440628, + -0.035275015980005264, + 0.029588639736175537, + -0.06691094487905502, + 0.00898666400462389, + 0.0008241200121119618, + -0.008226373232901096, + -0.003475134028121829, + 0.09871535003185272, + -0.013453544117510319, + -0.0248983446508646, + 0.04588478058576584, + -0.04358544200658798, + -0.01171786431223154, + 0.007031894754618406, + 0.028898796066641808, + -0.018851395696401596, + 0.024874411523342133, + -0.06730468571186066, + 0.06513497233390808, + -0.02341947704553604, + -0.1300688534975052, + 0.07476094365119934, + 0.03931420296430588, + -0.01620001159608364, + 0.020693253725767136, + -0.006374301854521036, + 0.1268724948167801, + -0.003501270664855838, + 0.0358487069606781, + -0.055235739797353745, + -0.031292177736759186, + 0.03855828195810318, + 0.03717692568898201, + -0.06879928708076477, + -0.01065569557249546, + -1.529338446064447e-33, + -0.03616950660943985, + -0.04276822507381439, + -0.00014796308823861182, + 0.01988811604678631, + 0.07844053953886032, + 0.05065995454788208, + -0.06873741000890732, + 0.1103002056479454, + -0.06779473274946213, + 0.014711784198880196, + -0.0017290434334427118, + -0.06427571922540665, + 0.03257346153259277, + -0.06683819741010666, + -0.022225990891456604, + 0.029125245288014412, + 0.06415965408086777, + 0.012521805241703987, + -0.03798842802643776, + -0.029732897877693176, + -0.06976762413978577, + 0.023706793785095215, + 0.0029791868291795254, + 0.0011467622825875878, + 0.04106318950653076, + -0.038287531584501266, + -0.04264458641409874, + -0.12842227518558502, + 0.0005678466404788196, + -0.0023208323400467634, + -0.04666811227798462, + 0.0375511534512043, + -0.0466262586414814, + -0.006578706204891205, + -0.05311303958296776, + 0.1500713974237442, + -0.060447994619607925, + -0.040288131684064865, + -0.015056487172842026, + 0.019624013453722, + -0.05558134615421295, + -0.015421823598444462, + -0.01886308193206787, + 0.07932337373495102, + 0.009356179274618626, + -0.022940747439861298, + 0.013714298605918884, + -0.0689530074596405, + -0.02436169609427452, + 0.06700454652309418, + -0.048821356147527695, + -0.004573563579469919, + 0.002577826613560319, + -0.0280748400837183, + -0.02929190918803215, + -0.017540164291858673, + 0.008312996476888657, + -0.017438989132642746, + -0.021972255781292915, + -0.011030114255845547, + -0.05133181810379028, + 0.0550311878323555, + -0.01679336465895176, + 0.05842278152704239, + 0.034998733550310135, + -0.05266587436199188, + 0.08335680514574051, + 0.037430014461278915, + 0.03566398471593857, + 0.06386339664459229, + -0.07763124257326126, + -0.08884169906377792, + -0.09337232261896133, + 0.01568431220948696, + -0.09639722853899002, + -0.011771096847951412, + 0.09444363415241241, + -0.033762283623218536, + -0.013602526858448982, + -0.048190925270318985, + 0.02574653923511505, + 0.008499222807586193, + 0.06351903825998306, + -0.0030302335508167744, + -0.07556988298892975, + -0.01565716601908207, + 0.04507524520158768, + -0.023016782477498055, + 0.06107738986611366, + -0.043238040059804916, + -0.003178733866661787, + -0.01981041394174099, + -0.026137415319681168, + 0.03115830197930336, + -0.09074348211288452, + 8.725001208157847e-35, + 0.04614301025867462, + 0.036987144500017166, + 0.017865633592009544, + -0.03159300982952118, + -0.007304938975721598, + -0.010950583964586258, + 0.08275042474269867, + -0.08706644177436829, + 0.02568327821791172, + 0.05718545988202095, + 0.053927887231111526, + -0.006121491547673941, + 0.012649421580135822, + -0.012571809813380241, + 0.025524944067001343, + -0.024388080462813377, + 0.04792862385511398, + -0.02091812901198864, + -0.0035120940301567316, + -0.021053194999694824, + 0.05043414607644081, + 0.049920592457056046, + -0.024030053988099098, + -0.005979544948786497, + 0.010529418475925922, + 0.027292607352137566, + 0.06462488323450089, + 0.044602490961551666, + -0.04713885113596916, + 0.08616981655359268, + 0.014813093468546867, + -0.03917733579874039, + 0.03670262545347214, + 0.07579175382852554, + -0.06490068137645721, + -0.04788922145962715, + -0.0652768686413765, + 0.12019319087266922, + 0.05158679932355881, + 0.027123358100652695, + -0.01982734724879265, + 0.01961171068251133, + -0.0029628071933984756, + 0.06079613417387009, + -0.0168132446706295, + -0.004503627307713032, + -0.0080448342487216, + 0.04195460304617882, + -0.011334228329360485, + -0.03669001907110214, + -0.03952644392848015, + -0.046158019453287125, + -0.1101846918463707, + 0.03337651863694191, + -0.03396852687001228, + 0.045539408922195435, + -0.016847413033246994, + 0.012157286517322063, + -0.07111786305904388, + -0.05162438005208969, + -0.047080591320991516, + 0.04129213094711304, + 0.05380281060934067, + -0.019338537007570267, + 0.06066751852631569, + -0.03876914829015732, + -0.036807138472795486, + -0.015056487172842026, + -0.04767259582877159, + -0.05523217096924782, + -0.031201407313346863, + -0.025611577555537224, + -0.11284048110246658, + 0.049827199429273605, + -0.0662313774228096, + 0.05264055356383324, + 0.08570318669080734, + -0.04347725585103035, + 0.0018289674771949649, + 0.03960298001766205, + -0.06804996728897095, + 0.01378120481967926, + 0.03125903382897377, + 0.017176788300275803, + -0.11235827952623367, + 0.09480982273817062, + 0.06245991587638855, + 0.055028386414051056, + -0.037794943898916245, + -0.10864784568548203, + 0.04583807662129402, + 0.06550206243991852, + 0.03894072026014328, + 0.05110755190253258, + -0.038986194878816605, + -1.5126882857430246e-08, + -0.03571377694606781, + -0.018318278715014458, + 0.013552538119256496, + 0.031250178813934326, + -0.049669694155454636, + 0.0015546131180599332, + 0.0553877018392086, + -0.02933032624423504, + 0.04077191278338432, + -0.0008707439992576838, + -0.08030615746974945, + 0.03169868886470795, + -0.04648694768548012, + -0.10577413439750671, + -0.06601260602474213, + -0.013211813755333424, + -0.06747905164957047, + -0.05690170079469681, + -0.04972357302904129, + 0.039645418524742126, + -0.028606392443180084, + 0.031542789191007614, + 0.00411334540694952, + -0.05257818475365639, + 0.0019198873778805137, + -0.02929576300084591, + 0.02520322985947132, + 0.05547931790351868, + 0.054769013077020645, + 0.02348582074046135, + 0.08896847814321518, + 0.08028880506753922, + 0.014175694435834885, + -0.030023811385035515, + -0.029654597863554955, + -0.05599077045917511, + 0.060854215174913406, + 0.004835318308323622, + 0.02240614779293537, + 0.01190100610256195, + -0.025359010323882103, + -0.0332559309899807, + 0.0390470027923584, + 0.0336269848048687, + -0.05825534090399742, + -0.04173823446035385, + 0.10094642639160156, + 0.058067645877599716, + 0.027451196685433388, + -0.006469864398241043, + 0.08559785783290863, + -0.017669595777988434, + -0.013770049437880516, + -0.04610254615545273, + -0.07263693958520889, + 0.02641061320900917, + 0.016135087236762047, + 0.05146069452166557, + -0.06183362007141113, + 0.008967398665845394, + -0.05406148359179497, + 0.014444761909544468, + 0.009693888947367668, + 0.006260524969547987 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/all-MiniLM-L6-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "短い日本語のテストです。", + "input_ids": [ + 101, + 100, + 1647, + 1864, + 1876, + 1950, + 1671, + 30239, + 30233, + 30240, + 30191, + 30184, + 1636, + 102 + ], + "embedding": [ + 0.03205885738134384, + 0.16086843609809875, + 0.06374333053827286, + -0.023469461128115654, + -0.05104292929172516, + 0.053574979305267334, + 0.1162504255771637, + 0.03482302278280258, + -0.004732255358248949, + -0.0012601676862686872, + 0.05813545361161232, + -0.09787233173847198, + -0.023985616862773895, + 0.02175929583609104, + -0.030880440026521683, + -0.1227334588766098, + 0.0349312424659729, + 0.0373719148337841, + -0.013902281410992146, + -0.03381801396608353, + 0.017607664689421654, + 0.007396485656499863, + 0.060073915868997574, + 0.04493517428636551, + -0.040235161781311035, + 0.027639981359243393, + 0.013460268266499043, + 0.0068632857874035835, + 0.024314142763614655, + 0.01223467942327261, + -0.019672952592372894, + -0.020858298987150192, + 0.01569906808435917, + -0.03236682340502739, + -0.016319110989570618, + -0.054777707904577255, + 0.0027159019373357296, + -0.06602266430854797, + 0.05427856370806694, + 0.002062438987195492, + -0.09970158338546753, + -0.032960906624794006, + 0.03366435691714287, + -0.08258126676082611, + 0.07220931351184845, + 0.03574910759925842, + -0.03659939393401146, + 0.05235535278916359, + 0.02952883020043373, + 0.003209408139809966, + -0.07088645547628403, + -0.03758466988801956, + -0.011497276835143566, + -0.016647901386022568, + -0.04531797021627426, + -0.01745232194662094, + 0.018194496631622314, + 0.06012782081961632, + 0.0026566670276224613, + -0.07894904166460037, + 0.011864511296153069, + 0.0021839721594005823, + 0.03234162554144859, + 0.07801532000303268, + 0.0021639768965542316, + -0.004224530886858702, + 0.0421035960316658, + 0.0838591530919075, + -0.07598382234573364, + -0.032210368663072586, + -0.020043538883328438, + -0.03922528401017189, + 0.09790391474962234, + -0.0058280061930418015, + -0.0017837723717093468, + -0.01241433434188366, + -0.015037073753774166, + -0.01559536810964346, + 0.0025578411296010017, + 0.03091427870094776, + -0.0016581860836595297, + 0.0028971086721867323, + 0.009794722311198711, + 0.033690351992845535, + 0.03536715358495712, + -0.009242886677384377, + -0.03419112786650658, + 0.03688986226916313, + 0.01417853869497776, + 0.011373967863619328, + -0.12049814313650131, + -0.023687774315476418, + -0.030478481203317642, + 0.04104955121874809, + -0.12699006497859955, + 0.019031113013625145, + -0.07737745344638824, + -0.02569391205906868, + -0.0021750149317085743, + 0.028265463188290596, + 0.013364582322537899, + 0.03897805139422417, + 0.07092151790857315, + 0.04739454761147499, + -0.021913764998316765, + -0.0039039470721036196, + -0.019650990143418312, + -0.016097666695713997, + 0.02123246155679226, + -0.008858446963131428, + -0.06253962963819504, + -0.014209634624421597, + -0.11168335378170013, + -0.054913926869630814, + 0.07850760966539383, + 0.045853327959775925, + 0.11494702845811844, + -0.03249243646860123, + -0.01304013654589653, + -0.00965732242912054, + 0.010987385176122189, + -0.028399238362908363, + 0.04287685826420784, + -0.06913024932146072, + -0.06770361959934235, + -0.020261039957404137, + 0.08739134669303894, + 2.6116889204149804e-33, + -0.007662020158022642, + -0.023188550025224686, + 0.003045306308194995, + -0.039466194808483124, + -0.09346605092287064, + -0.011576886288821697, + -0.014546744525432587, + 0.013805042952299118, + -0.0019900344777852297, + -0.04480858892202377, + -0.0826464518904686, + 0.03126128017902374, + 0.01985015533864498, + 0.0066009145230054855, + -0.0005890606553293765, + 0.03509442135691643, + -0.0005795026663690805, + 0.09586994349956512, + 0.1336694359779358, + -0.027087491005659103, + 0.0019653651397675276, + -0.06426957249641418, + 0.036070238798856735, + -0.06552376598119736, + 0.06413015723228455, + -0.0552387498319149, + -0.04793482646346092, + -0.018195293843746185, + -0.08668331801891327, + 0.025580067187547684, + 0.03623100370168686, + -0.005804989021271467, + -0.03926370292901993, + -0.03206930682063103, + 0.008292780257761478, + -0.07312314212322235, + 0.05795036256313324, + 0.07770973443984985, + 0.08677028864622116, + -0.0033498702105134726, + 0.07458410412073135, + -0.06593109667301178, + -0.022930465638637543, + -0.03765871003270149, + 0.10776733607053757, + 0.014455088414251804, + 0.07253025472164154, + -0.07140590250492096, + -0.008693793788552284, + 0.04680747538805008, + -0.019374461844563484, + 0.019616039469838142, + -0.08080164343118668, + 0.03611317276954651, + 0.1362336128950119, + 0.06331431120634079, + 0.04078145697712898, + 0.07570043206214905, + -0.048779867589473724, + 0.010615603998303413, + -0.05925093963742256, + -0.01851925626397133, + -0.09149786084890366, + 0.06909527629613876, + -0.04670239984989166, + -0.042857784777879715, + -0.02477903850376606, + -0.06967997550964355, + 0.007555120624601841, + -0.04294244572520256, + -0.09770147502422333, + -0.03391966596245766, + 0.039766356348991394, + 0.038814615458250046, + -0.08745066821575165, + -0.041916295886039734, + 0.024413853883743286, + 0.019580019637942314, + 0.03836382180452347, + 0.026337500661611557, + -0.0037603701930493116, + -0.05613221228122711, + 0.0035709156654775143, + -0.06877651065587997, + 0.04411881044507027, + 0.10182739049196243, + 0.01657399907708168, + -0.056954771280288696, + 0.10212603211402893, + 0.008675864897668362, + 0.022276494652032852, + 0.0020434369798749685, + -0.013535033911466599, + 0.010120966471731663, + 0.06332871317863464, + -4.3059801724619995e-33, + 0.027534566819667816, + 0.053823862224817276, + -0.08941680938005447, + -0.024296296760439873, + -0.052636612206697464, + 0.025041192770004272, + -0.006686207372695208, + 0.14507482945919037, + 0.0035413645673543215, + 0.011032355017960072, + 0.06231314688920975, + -0.053519781678915024, + 0.02766285091638565, + 0.019451484084129333, + -0.059092529118061066, + -0.06389695405960083, + 0.006536548025906086, + -0.023959610611200333, + 0.005660479422658682, + 0.07520971447229385, + 0.03322281688451767, + -0.0754430741071701, + -0.04630354791879654, + -0.04250349476933479, + 0.02397424355149269, + -0.011137723922729492, + 0.007993817329406738, + 0.026366667822003365, + 0.009435135871171951, + 0.007243361324071884, + -0.04253223165869713, + 0.016823017969727516, + -0.01505605410784483, + 0.0010796397691592574, + 0.01213563047349453, + -0.0070630284026265144, + -0.01239047758281231, + -0.033698614686727524, + -0.04549558460712433, + 0.10417050868272781, + 0.04173370450735092, + 0.034106407314538956, + 0.0018512929091230035, + 0.002184163313359022, + -0.019863493740558624, + 0.12065750360488892, + -0.08488185703754425, + -0.04861016198992729, + 0.009696885012090206, + -0.013183520175516605, + 0.03978783264756203, + -0.043304502964019775, + 0.044515032321214676, + -0.07340970635414124, + 0.06995157152414322, + 0.009459275752305984, + -0.0025987594854086637, + 0.02410903200507164, + -0.0426226407289505, + 0.06449148058891296, + -0.02900589443743229, + -0.019005317240953445, + 0.0074946763925254345, + -0.0004992622998543084, + 0.06394162774085999, + -0.05831998586654663, + -0.03977256268262863, + 0.11320555955171585, + 0.07497803866863251, + 0.007560025900602341, + 0.09697995334863663, + -0.03355581685900688, + -0.039053164422512054, + -0.021511845290660858, + -0.13166052103042603, + -0.02993939444422722, + -0.06673818826675415, + 0.047836121171712875, + 0.0968412384390831, + 0.0630413293838501, + -0.026802407577633858, + 0.05124291032552719, + -0.01614982821047306, + -0.10404030233621597, + 0.003608334343880415, + -0.01624322682619095, + -0.059670377522706985, + 0.04688629135489464, + -0.002162204124033451, + -0.040265414863824844, + -0.012186754494905472, + 0.05765103921294212, + 0.01647902838885784, + -0.02094479650259018, + -0.034535862505435944, + -1.86901623067115e-08, + -0.057766735553741455, + -0.09140598028898239, + 0.0319790355861187, + 0.03804771974682808, + 0.012308220379054546, + -0.03229469060897827, + -0.025744764134287834, + -0.0011940815020352602, + 0.007433152291923761, + -0.06806692481040955, + 0.02952059730887413, + 0.062181998044252396, + -0.07133366912603378, + 0.09461979568004608, + -0.019642600789666176, + 0.01187298633158207, + -0.027736200019717216, + -0.012437965720891953, + 0.06763102114200592, + 0.0014738383470103145, + 0.17279398441314697, + -0.044820789247751236, + 0.029481368139386177, + -0.020436197519302368, + -0.04920439049601555, + 0.09484749287366867, + -0.012937667779624462, + 0.0009526772773824632, + -0.018967242911458015, + -0.006267996970564127, + -0.04578196629881859, + -0.00036099617136642337, + -0.04464428499341011, + -0.005542884115129709, + -0.07250862568616867, + -0.005405033472925425, + -0.025711150839924812, + 0.018042946234345436, + -0.04363048076629639, + 0.024303628131747246, + 0.04977123811841011, + 0.051014505326747894, + -0.029372673481702805, + -0.010494410991668701, + 0.08841574937105179, + -0.008794380351901054, + 0.008834343403577805, + 0.0009719986119307578, + -0.0466347336769104, + -0.09386201947927475, + -0.07879338413476944, + 0.015819158405065536, + 0.015720242634415627, + -0.0464765690267086, + -0.025182481855154037, + 0.10500253736972809, + 0.05689794942736626, + 0.004848202224820852, + 0.004951473791152239, + 0.06902151554822922, + -0.05345256254076958, + 0.033634524792432785, + -0.06487272679805756, + 0.003038187278434634 + ], + "embedding_dim": 384 + } +] \ No newline at end of file diff --git a/crates/embed/tests/fixtures/embed_parity_v1/paraphrase_multilingual_minilm_l12_v2.json b/crates/embed/tests/fixtures/embed_parity_v1/paraphrase_multilingual_minilm_l12_v2.json new file mode 100644 index 00000000..66f0779a --- /dev/null +++ b/crates/embed/tests/fixtures/embed_parity_v1/paraphrase_multilingual_minilm_l12_v2.json @@ -0,0 +1,2034 @@ +[ + { + "model_id": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "The quick brown fox jumps over the lazy dog.", + "input_ids": [ + 0, + 581, + 63773, + 119455, + 6, + 147797, + 88203, + 7, + 645, + 70, + 21, + 3285, + 10269, + 5, + 2 + ], + "embedding": [ + 0.016176845878362656, + -0.0024291500449180603, + -0.03550096973776817, + 0.030654067173600197, + 0.014600556343793869, + -0.05371175706386566, + -0.01922299712896347, + 0.019757090136408806, + -0.00019868584058713168, + -0.09856396168470383, + 0.0280915480107069, + 0.04394601285457611, + -0.016997123137116432, + -0.06344208866357803, + -0.06462831795215607, + 0.014497455209493637, + -0.0932188630104065, + -0.038639094680547714, + -0.03222640976309776, + -0.014721361920237541, + -0.018839120864868164, + -0.05280837416648865, + 0.027139956131577492, + -0.01275756023824215, + -0.11652036011219025, + -0.022488147020339966, + -0.08512122184038162, + -0.003796958364546299, + 0.00286191632039845, + -0.023510964587330818, + 0.05718143656849861, + -0.039258867502212524, + -0.02809092029929161, + -0.08430475741624832, + 0.012727790512144566, + 0.031785998493433, + 0.013417753390967846, + -0.10608528554439545, + -0.07010951638221741, + -0.07380086183547974, + 0.021211454644799232, + -0.016326691955327988, + 0.06337833404541016, + -0.0028492044657468796, + -0.05777917429804802, + -0.01892586424946785, + -0.06040143966674805, + -0.0900191143155098, + -0.03186348080635071, + 0.038251783698797226, + 0.029350170865654945, + 0.018703922629356384, + -0.06205973029136658, + 0.08323528617620468, + 0.12476219981908798, + -0.008272361941635609, + 0.08856071531772614, + 0.07046446204185486, + -0.0850844532251358, + 0.024358779191970825, + -0.003911611624062061, + 0.02333557978272438, + 0.013863258063793182, + 0.00657630804926157, + 0.07671278715133667, + -0.007111965678632259, + 0.009203219786286354, + -0.006267260294407606, + -0.1317480206489563, + 0.06130555272102356, + -0.00755051476880908, + -0.02279742620885372, + -0.02421192266047001, + -0.05931873619556427, + 0.06052446737885475, + 0.0479072667658329, + -0.04906396567821503, + -0.003167235292494297, + 0.04621581733226776, + 0.04944699630141258, + 0.03917378932237625, + 0.053543057292699814, + -0.015418599359691143, + -0.010059473104774952, + 0.02014867588877678, + 0.06576072424650192, + 0.044106047600507736, + -0.078633151948452, + -0.04084407538175583, + -0.007458007428795099, + 0.02607877366244793, + 0.020545074716210365, + 0.021475771442055702, + -0.026518557220697403, + 0.04246858134865761, + 0.0944923460483551, + 0.013413231819868088, + -0.018895890563726425, + -0.04602846875786781, + -0.0028682101983577013, + 0.01491318829357624, + 0.048921722918748856, + -0.04316017031669617, + -0.05199935659766197, + 0.026309890672564507, + -0.0040393611416220665, + -0.08867447823286057, + -0.04414098337292671, + -0.009942884556949139, + -0.011640625074505806, + 0.024406038224697113, + 0.03622410073876381, + 0.007085202727466822, + 0.07285158336162567, + 0.024711722508072853, + -0.04448225349187851, + 0.02543809451162815, + -0.01666184887290001, + 0.019050762057304382, + -0.027963098138570786, + 0.07159576565027237, + 0.06389621645212173, + 0.03988707438111305, + 0.00224679266102612, + 0.0660964623093605, + 0.007030276581645012, + -0.014930487610399723, + 0.052348073571920395, + 0.012401198968291283, + -0.079622782766819, + -0.009638261049985886, + -0.10580070316791534, + -0.021115731447935104, + -0.13777682185173035, + 0.03723274543881416, + 0.03036021813750267, + -0.013824602589011192, + 0.005554575473070145, + -0.06089481711387634, + -0.017137881368398666, + -0.007044312544167042, + -0.03773782029747963, + 0.11205991357564926, + 0.016479287296533585, + -0.019939258694648743, + -0.040491972118616104, + 0.029098181053996086, + 0.01345724705606699, + 0.029001638293266296, + 0.08520100265741348, + -0.006714730057865381, + -0.02990070730447769, + 0.06789565831422806, + -0.07232417911291122, + -0.1132807806134224, + 0.03285590931773186, + -0.0849732756614685, + 0.05613963305950165, + -0.0073059252463281155, + -0.058340441435575485, + -0.10409528762102127, + 0.08360277116298676, + 0.021460488438606262, + -0.012011833488941193, + 0.02123347297310829, + -0.02506750449538231, + -0.0023218183778226376, + 0.09650697559118271, + -0.021428443491458893, + 0.02523132786154747, + 0.062433239072561264, + -0.04684116318821907, + -0.048692114651203156, + -0.04243980348110199, + -0.03640405088663101, + -0.0723673552274704, + -0.09376981854438782, + -0.013182578608393669, + -0.02206171303987503, + 0.03991267830133438, + 0.028686443343758583, + 0.021084237843751907, + 0.06380771845579147, + 0.013757258653640747, + -0.039327606558799744, + -0.03539251536130905, + -0.045968130230903625, + 0.07960734516382217, + 0.03500143066048622, + -0.0806964784860611, + 0.030365431681275368, + -0.0496462844312191, + 0.07705096900463104, + -0.11172010004520416, + -0.004536458291113377, + -0.0007368808146566153, + -0.042878709733486176, + -0.056930553168058395, + 0.03477103263139725, + -0.01818605326116085, + 0.05700518190860748, + -0.10554039478302002, + 0.10488021373748779, + -0.01734129525721073, + 0.004878587555140257, + -0.0069536627270281315, + -0.09442539513111115, + -0.01670914888381958, + 0.0741892009973526, + 0.015546008944511414, + -0.03129170089960098, + -0.025822674855589867, + -0.014756657183170319, + 0.027248447760939598, + -0.011224588379263878, + 0.03979036211967468, + -0.03777621313929558, + -0.0206111129373312, + 0.024219952523708344, + 0.01651463471353054, + 0.07148992270231247, + -0.030181309208273888, + -0.054343082010746, + 0.038962218910455704, + 0.07120868563652039, + 0.008780285716056824, + 0.009510924108326435, + 0.04427536576986313, + -0.07716064900159836, + 0.05069861561059952, + -0.09082753956317902, + -0.022128678858280182, + -0.02872372977435589, + 0.009566563181579113, + -0.030673503875732422, + 0.01552846934646368, + 0.017917610704898834, + 0.0783078595995903, + 0.08520558476448059, + 0.017833247780799866, + 0.04034358263015747, + -0.009606689214706421, + -0.008056462742388248, + 0.045646946877241135, + 0.03559251129627228, + 0.09124492108821869, + -0.025438912212848663, + 0.008758819662034512, + -0.013875125907361507, + -0.03533688187599182, + 0.04524894803762436, + 0.048422206193208694, + -0.0281324852257967, + -0.023212751373648643, + 0.03415872901678085, + -0.05768055096268654, + 0.07394563406705856, + 0.01560112927109003, + 0.09077871590852737, + 0.05907677859067917, + 0.06199844554066658, + -0.037568263709545135, + 0.0026250267401337624, + -0.05871574953198433, + 0.07563704997301102, + -0.026616014540195465, + -0.007840917445719242, + 0.01155077014118433, + 0.055109407752752304, + -0.03180861100554466, + -0.07690434902906418, + 0.06559852510690689, + -0.025708436965942383, + 0.10794276744127274, + 0.13528071343898773, + -0.06914814561605453, + -0.055676087737083435, + -0.026983197778463364, + -0.05248067155480385, + -0.022987544536590576, + -0.018804721534252167, + 0.007051559165120125, + 0.04751718044281006, + 0.08481236547231674, + -0.020220225676894188, + 0.0057993303053081036, + 0.00799818430095911, + -0.005084800533950329, + -0.011540420353412628, + -0.034482263028621674, + -0.08015609532594681, + 0.010776783339679241, + 0.09281650185585022, + -0.06102851405739784, + -0.033202242106199265, + 0.06695564091205597, + -0.048635728657245636, + 0.01900409907102585, + -0.08910268545150757, + -0.01595824398100376, + 0.0866345688700676, + -0.029307028278708458, + 0.02854948304593563, + 0.019525030627846718, + -0.012135324068367481, + 0.02828352525830269, + 0.005450138822197914, + -0.04709405079483986, + -0.12191412597894669, + 0.04867182672023773, + -0.04883044585585594, + 0.0314953476190567, + 0.001666787313297391, + -0.09525495767593384, + 0.05550144985318184, + 0.035829465836286545, + 0.04361804574728012, + 0.018545331433415413, + -0.005800427403301001, + 0.06269929558038712, + 0.03537953644990921, + 0.05111883953213692, + -0.1250232309103012, + 0.09050699323415756, + 0.009463983587920666, + -0.02639058232307434, + -0.07039911299943924, + -0.017442487180233, + 0.05358823388814926, + -0.018344324082136154, + 0.07473012804985046, + 0.022504957392811775, + 0.028134267777204514, + -0.00521759781986475, + 0.058219797909259796, + -0.02865729294717312, + 0.04915162920951843, + -0.043209463357925415, + -0.028327029198408127, + -0.02552957832813263, + -0.0339798778295517, + -0.045894477516412735, + -0.07209675759077072, + -0.017845934256911278, + -0.10377836972475052, + 0.007594467140734196, + 0.04288976266980171, + 0.03013026900589466, + -0.006678441539406776, + -0.00025332142831757665, + -0.04333699122071266, + 0.0456649474799633, + -0.12136260420084, + 0.03321523219347, + 0.030107470229268074, + 0.0687963142991066, + 0.021254785358905792, + -0.0075755310244858265, + -0.018171416595578194, + -0.00761018181219697, + 0.04748116433620453, + -0.014522247947752476, + 0.0033886381424963474, + 0.030338777229189873, + -0.02878333441913128, + 0.01813507080078125, + 0.060009345412254333, + -0.0815679281949997, + 0.08280276507139206, + -0.0715988427400589, + -0.017644012346863747, + 0.03567960113286972, + 0.05839226394891739, + 0.01178856659680605, + -0.05094895884394646, + 0.021868418902158737, + 0.002238090382888913, + -0.022443173453211784, + -0.02080407552421093, + 0.05969908833503723, + 0.003693290986120701, + 0.023886870592832565, + 0.1204923689365387, + 0.09982351213693619 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "Pure Rust transformer inference engine.", + "input_ids": [ + 0, + 118233, + 144222, + 27198, + 56, + 53498, + 6620, + 87907, + 5, + 2 + ], + "embedding": [ + -0.17215566337108612, + 0.006294917780905962, + -0.03775323927402496, + -0.030231187120079994, + 0.005247363820672035, + 0.03310311585664749, + -0.045191146433353424, + 0.04849106818437576, + -0.06344549357891083, + -0.05086597800254822, + 0.012633930891752243, + 0.0037352757062762976, + 0.040426868945360184, + -0.05565900355577469, + -0.046079885214567184, + 0.02046726644039154, + 0.007276087999343872, + 0.09645432233810425, + -0.0008170677465386689, + -0.05360610783100128, + 0.027808452025055885, + -0.04486094415187836, + -0.0018659370252862573, + -0.04383810982108116, + -0.029596906155347824, + 0.025882095098495483, + 0.06559687107801437, + -0.02167755924165249, + 0.004804013762623072, + -0.0688551515340805, + 0.05545322969555855, + 0.00826197862625122, + 0.04138711839914322, + 0.013463852927088737, + -0.02113419398665428, + -0.06338238716125488, + -0.04024321585893631, + 0.007773716468364, + 0.0016639179084450006, + -0.003438627580180764, + -0.05557423084974289, + 0.03384704142808914, + 0.018984712660312653, + 0.0243049506098032, + -0.004074618220329285, + 0.024457883089780807, + -0.032656021416187286, + -0.04448516666889191, + -0.06185068562626839, + -0.01937800645828247, + -0.019535375759005547, + 0.02107316441833973, + -0.02857530489563942, + -0.09381423890590668, + 0.1143445372581482, + -0.027950698509812355, + 0.08661925047636032, + 0.04343196377158165, + 0.014540336094796658, + -0.022153353318572044, + 0.0733795315027237, + -0.052070461213588715, + -0.00795645173639059, + -0.06937617063522339, + 0.06914079934358597, + 0.1005467101931572, + 0.013712117448449135, + -0.03221540525555611, + 0.06115124374628067, + -0.0080077750608325, + -0.0447203628718853, + 0.0011061487020924687, + 0.018985368311405182, + 0.00932097528129816, + -0.006758982315659523, + 0.039860937744379044, + -0.034331243485212326, + 0.02607526257634163, + 0.023874375969171524, + 0.012453044764697552, + -0.04318010434508324, + -0.0432160384953022, + -0.02978435531258583, + -0.09168373793363571, + 0.08081454783678055, + 0.04539228603243828, + -0.012733046896755695, + 0.060273319482803345, + -0.006265607196837664, + 0.07369271665811539, + 0.0739184021949768, + -0.056662917137145996, + -0.0763733983039856, + 0.030635416507720947, + 0.06305081397294998, + 0.07422517985105515, + -0.003962506074458361, + -0.01829530857503414, + 0.12014903128147125, + 0.05773972347378731, + -0.023236555978655815, + -0.04406696557998657, + -0.06682147830724716, + -0.08773583918809891, + -0.05484255030751228, + -0.02298922650516033, + -0.05353304371237755, + 0.031254276633262634, + -0.01806199736893177, + 0.007555592805147171, + 0.06367175281047821, + -0.005311380606144667, + 0.004407560918480158, + -0.023797936737537384, + 0.05341460183262825, + -0.059395913034677505, + -0.0332060232758522, + -0.03198027238249779, + -0.028430430218577385, + 0.06006953865289688, + 0.042650431394577026, + 0.05963718891143799, + 0.034252677112817764, + 0.14684709906578064, + 0.020479444414377213, + -0.11639858782291412, + -0.061691589653491974, + 0.03810714930295944, + -0.04117777198553085, + 0.04840672016143799, + 0.032800957560539246, + 0.0217136237770319, + -0.04678047448396683, + 0.008629834279417992, + -0.03724156692624092, + 0.07426325976848602, + -0.00567131582647562, + 0.02794775739312172, + -0.001043973141349852, + 0.045074619352817535, + -0.10343726724386215, + -0.09452532231807709, + -0.04131877422332764, + 0.037979453802108765, + -0.0595049113035202, + -0.03292875364422798, + -0.10410439968109131, + -0.08177138864994049, + 0.054521188139915466, + 0.027990706264972687, + 0.02340369112789631, + -0.0012552501866593957, + -0.009182511828839779, + 0.03251584619283676, + 0.014904428273439407, + 0.022780992090702057, + 0.01618845760822296, + 0.004860061686486006, + 0.0361204594373703, + -0.013289324007928371, + -0.07916633039712906, + 0.07936711609363556, + 0.04711156338453293, + 0.008540498092770576, + -0.0561048723757267, + -0.008474870584905148, + -0.05387931689620018, + 0.025554994121193886, + -0.01926969736814499, + 0.057073213160037994, + 0.06432712823152542, + -0.016887109726667404, + -0.007912698201835155, + -0.06060647591948509, + -0.004788028076291084, + 0.03736579045653343, + -0.026047516614198685, + -0.04515964910387993, + -0.010133914649486542, + 0.029617823660373688, + 0.10973756015300751, + 0.07571497559547424, + 0.0694177895784378, + -0.008482580073177814, + -0.0024412106722593307, + 0.03812788426876068, + 0.015407954342663288, + 0.016010966151952744, + -0.04978008568286896, + 0.02352938987314701, + -0.030560797080397606, + -0.02996004745364189, + -0.03307993337512016, + 0.016819464042782784, + -0.044649749994277954, + -0.1037721335887909, + 0.07028262317180634, + 0.05034303665161133, + 0.013347405008971691, + 0.02268247678875923, + -0.06271958351135254, + 0.07453781366348267, + -0.06763026863336563, + -0.037859559059143066, + -0.046474639326334, + 0.005017854738980532, + -0.09525202959775925, + -0.08697797358036041, + -0.12689410150051117, + 0.0698709785938263, + -0.0015317999059334397, + -0.11243821680545807, + 0.062101732939481735, + 0.03181535750627518, + 0.02715216390788555, + 0.02582520991563797, + -0.044943664222955704, + -0.004434172064065933, + -0.046397071331739426, + -0.037685081362724304, + -0.01811944879591465, + -0.03396700695157051, + 0.0359010249376297, + -0.022354191169142723, + -0.03420579805970192, + -0.018488185480237007, + 0.006133570801466703, + 0.02487562783062458, + -0.033949997276067734, + -0.033640410751104355, + -0.04919701814651489, + -0.02100382372736931, + -0.08732376992702484, + 0.015260214917361736, + 0.04895932227373123, + -0.02868938446044922, + -0.031176986172795296, + 0.0327957384288311, + 0.04943662881851196, + -0.038415126502513885, + 0.009514519944787025, + -0.0517534576356411, + 0.028036758303642273, + 0.05214986205101013, + 0.02007758803665638, + 0.1010657474398613, + -0.05401413142681122, + -0.03106231614947319, + -0.032540760934352875, + 0.10112325102090836, + -0.05439241975545883, + 0.008711544796824455, + 0.07871001958847046, + 0.031574051827192307, + -0.005678979214280844, + 0.04107983410358429, + -0.022076111286878586, + 0.09555373340845108, + -0.11139434576034546, + -0.00033067609183490276, + 0.07439372688531876, + -0.028645362704992294, + -0.031713590025901794, + -0.041335392743349075, + -0.00018107764481101185, + 0.04278917238116264, + -0.0028260278049856424, + 0.04763707146048546, + -0.06536281853914261, + -0.06908819824457169, + 0.022892188280820847, + 0.06961622834205627, + 0.02894330769777298, + 0.02422522008419037, + 0.0660950168967247, + -0.047021642327308655, + 0.02915005013346672, + -0.010899178683757782, + -0.09915127605199814, + -0.011443080380558968, + -0.02576608769595623, + 0.020223503932356834, + -0.057186469435691833, + 0.05409742891788483, + 0.09608740359544754, + -0.044106196612119675, + -0.0035672562662512064, + -0.010592818260192871, + -0.0898626446723938, + -0.0028648648876696825, + -0.03392470255494118, + 0.08808119595050812, + -0.03912372887134552, + -0.07215887308120728, + -0.026120124384760857, + 0.09381401538848877, + 0.11548164486885071, + 0.017968405038118362, + -0.021946227177977562, + -0.10135431587696075, + -0.018305370584130287, + 0.07881630957126617, + -0.00012307727592997253, + -0.02471465989947319, + 0.050745997577905655, + -0.05638522654771805, + 0.10532453656196594, + 0.05437527224421501, + 0.07009869068861008, + -0.03989420086145401, + -0.06208503991365433, + 0.0013715882087126374, + 0.016962161287665367, + -0.039928533136844635, + -0.07172702252864838, + -0.005908696446567774, + 0.017505673691630363, + 0.04409174993634224, + -0.007578875869512558, + -0.02798520028591156, + -0.06346382200717926, + 0.007964175194501877, + 0.022167611867189407, + 0.007670794613659382, + 0.01469709724187851, + -0.0011857752688229084, + -0.03014204651117325, + 0.000523276801686734, + -0.035634223371744156, + -0.05177413672208786, + -0.016765503212809563, + 0.031245946884155273, + 0.005253513343632221, + 0.013418080285191536, + 0.0017093989299610257, + 0.07358188182115555, + -0.023418515920639038, + 0.11345531791448593, + -0.00863276980817318, + 0.03298860043287277, + 0.08801756054162979, + 0.035617634654045105, + -0.03812182694673538, + 0.009361467324197292, + -0.002271076897159219, + 0.04216163232922554, + -0.030161099508404732, + -0.027252526953816414, + 0.028720282018184662, + -0.07308556884527206, + -0.05155694857239723, + 0.042300641536712646, + 0.013749896548688412, + 0.030450277030467987, + 0.04784257709980011, + 0.06858129054307938, + 0.04176313802599907, + 0.08829519897699356, + 0.046304117888212204, + 0.024569248780608177, + 0.015445593744516373, + -0.0021335065830498934, + -0.16474950313568115, + -0.01830846071243286, + 0.0726345106959343, + -0.00047735494445078075, + -0.035793427377939224, + -0.09033600986003876, + -0.0689225047826767, + 0.06298809498548508, + 0.04067986458539963, + 0.015681389719247818, + -0.001508431858383119, + 0.05413094907999039, + 0.044773299247026443, + 0.01648692972958088, + 0.03731604665517807, + -0.05914800614118576, + -0.059279728680849075, + 0.007373505737632513, + 0.013170932419598103, + 0.04686668887734413, + 0.10352151095867157, + 0.020197775214910507 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "Café résumé naïve façade — Unicode test.", + "input_ids": [ + 0, + 61427, + 233482, + 24, + 9392, + 272, + 65335, + 112, + 292, + 219778, + 3034, + 5, + 2 + ], + "embedding": [ + 0.021676387637853622, + 0.008133351802825928, + -0.03167964518070221, + 0.017799999564886093, + -0.09155378490686417, + -0.03268033638596535, + -0.016652453690767288, + -0.013552325777709484, + 0.0007130481535568833, + -0.009419718757271767, + -0.04877149686217308, + -0.06235262379050255, + 0.05909960716962814, + -0.053531911224126816, + 0.04813893884420395, + -0.04009777307510376, + -0.05166160687804222, + 0.02033979259431362, + 0.09033920615911484, + 0.0110055822879076, + -0.0010937086772173643, + -0.04572546109557152, + 0.03875105455517769, + -0.00869853887706995, + -0.007060985546559095, + 0.04492572322487831, + 0.09667716175317764, + 0.035997625440359116, + 0.027761969715356827, + -0.04654825106263161, + -0.003358611138537526, + 0.06728196889162064, + 0.06935356557369232, + -0.04362466186285019, + 0.013029384426772594, + 0.0170493945479393, + -0.004584421869367361, + -0.0031947577372193336, + 0.009197106584906578, + 0.006986378226429224, + -0.045334771275520325, + 0.0038075661286711693, + -0.02328656241297722, + 0.06594807654619217, + -0.004534467123448849, + -0.0019964391831308603, + -0.015733689069747925, + 0.020158659666776657, + -0.09706197679042816, + 0.054311659187078476, + -0.022659655660390854, + -0.04517088457942009, + -0.0484611950814724, + -0.06675731390714645, + 0.00020015065092593431, + 0.0025512438733130693, + -0.0302706528455019, + 0.04671007767319679, + 0.0054670292884111404, + 0.06254413723945618, + 0.01696924678981304, + -0.0523998849093914, + -0.065305694937706, + 0.06633120030164719, + 0.024805843830108643, + 0.02616574428975582, + -0.012945370748639107, + -0.051062606275081635, + -0.02413107641041279, + 0.048209432512521744, + -0.03482497110962868, + -0.0866074487566948, + 0.002427250612527132, + 0.07522661983966827, + 0.12390194833278656, + 0.0012910075020045042, + 0.0007613475900143385, + -0.065620556473732, + -0.04684566333889961, + -0.030509384348988533, + 0.05464037507772446, + -0.03002195619046688, + 0.05329376086592674, + 0.046769674867391586, + 0.05247851461172104, + -0.003495196346193552, + -0.014907898381352425, + 0.005201366264373064, + -0.06829381734132767, + 0.032586243003606796, + -0.04395934194326401, + -0.08422788977622986, + 0.04486948996782303, + 0.04753679409623146, + -0.006061078980565071, + -0.04043326899409294, + -0.0468033105134964, + 0.054314181208610535, + 0.06538460403680801, + 0.11772206425666809, + 0.02037668600678444, + 0.011461596935987473, + 0.002903955988585949, + 0.04292543977499008, + -0.025111297145485878, + -0.06093106046319008, + 0.05132843926548958, + -0.008572626858949661, + 0.010845261625945568, + -0.06999656558036804, + -0.00020706823852378875, + 0.005547688342630863, + 0.015285437926650047, + 0.015624504536390305, + -0.017076537013053894, + -0.1200619786977768, + 0.008559143170714378, + -0.10463862866163254, + 0.008664480410516262, + 0.06257683038711548, + -0.0002826624258887023, + 0.061939891427755356, + -0.005784992128610611, + 0.026156732812523842, + -0.0548660084605217, + -0.05746288597583771, + 0.023805392906069756, + 0.03329145908355713, + -0.020970100536942482, + 0.11455406993627548, + 0.04865145683288574, + 0.025261687114834785, + 0.08105884492397308, + 0.03992582485079765, + -0.0034730229526758194, + -0.04153791442513466, + -0.03560496121644974, + 0.01774591952562332, + 0.07424222677946091, + 0.03040381707251072, + -0.05472111701965332, + 0.10973822325468063, + 0.011334273032844067, + 0.09642264991998672, + 0.028121711686253548, + 0.02685311995446682, + -0.1148279458284378, + 0.027690023183822632, + -0.03469943627715111, + 0.014881991781294346, + 0.07640659064054489, + -0.018442049622535706, + -0.07461687922477722, + 0.05421631038188934, + -0.014700998552143574, + 0.00293614249676466, + -0.01682349108159542, + 0.054528381675481796, + -0.03499497100710869, + -0.061697639524936676, + 0.0076737236231565475, + -0.0027717859484255314, + 0.0016108641866594553, + -0.024450303986668587, + 0.054880715906620026, + -0.06104273349046707, + -0.023356085643172264, + 0.07233475893735886, + -0.03542853891849518, + 0.03501066938042641, + 0.07944789528846741, + 0.03754440322518349, + 0.036284152418375015, + 0.06396174430847168, + -0.056272875517606735, + -0.00958595983684063, + -0.025078317150473595, + 0.06020699441432953, + -0.0785801038146019, + 0.06299992650747299, + 0.004229983314871788, + 0.052689991891384125, + -0.021960070356726646, + -0.07250450551509857, + -0.0008170082583092153, + -0.00926243420690298, + 0.071123406291008, + 0.014920060522854328, + -0.002725718542933464, + 0.07620356976985931, + -0.06584668159484863, + -0.047741737216711044, + -0.0014599451096728444, + 0.0571720190346241, + -0.019418658688664436, + -0.07575862109661102, + 0.03938660770654678, + -0.0178147554397583, + -0.011188345029950142, + -0.002864100271835923, + -0.030537188053131104, + -0.0038906659465283155, + -0.018734777346253395, + -0.020292049273848534, + 0.04276937246322632, + 0.027160584926605225, + 0.050628576427698135, + -0.02838306687772274, + 0.06076658144593239, + 0.04206022620201111, + -0.054564766585826874, + -0.06241915747523308, + -0.05049845948815346, + -0.020133953541517258, + 0.13617752492427826, + -0.05339987576007843, + -0.031433336436748505, + 0.0550302118062973, + -0.02757435105741024, + 0.050037089735269547, + -0.005130842328071594, + -0.09316184371709824, + -0.0642135888338089, + -0.12807545065879822, + 0.045704953372478485, + 0.01986454613506794, + -0.04183099791407585, + -0.013909541070461273, + -0.15143108367919922, + 0.024543678387999535, + 0.06104106828570366, + 0.022752908989787102, + 0.04753711819648743, + -0.02491903118789196, + 0.07573629915714264, + -0.012041600421071053, + 0.06368647515773773, + 0.002405727980658412, + -0.08506323397159576, + 0.019674526527523994, + 0.02019834890961647, + 0.041357845067977905, + -0.02433207258582115, + -0.04250961169600487, + 0.03069342114031315, + -0.03403918445110321, + -0.10810796916484833, + 0.038169994950294495, + -0.022609269246459007, + 0.1230199858546257, + 0.027475962415337563, + -0.0916949138045311, + -0.07308050990104675, + 0.017978638410568237, + -0.029896220192313194, + 0.0651291012763977, + -0.02108173444867134, + -0.010789496824145317, + 0.03769092634320259, + 0.07533914595842361, + -0.019302761182188988, + -0.03318077698349953, + -0.05064095929265022, + 0.0032374332658946514, + 0.0017564366571605206, + 0.03427129238843918, + -0.0592130646109581, + 0.0008957164245657623, + -0.005642489530146122, + 0.004760947544127703, + -0.10907982289791107, + -0.04225900024175644, + 0.04841296374797821, + 0.014457141980528831, + 0.10019474476575851, + 0.01827191561460495, + 0.04398629441857338, + -0.07733315974473953, + -0.11476761102676392, + 0.008522067219018936, + -0.04759319871664047, + -0.019086668267846107, + 0.025021223351359367, + 0.012454208917915821, + 0.003239099169149995, + 0.016792500391602516, + 0.02613910101354122, + -0.09371599555015564, + 0.07749355584383011, + -0.05498666316270828, + 0.005061867646872997, + 0.022684352472424507, + 0.06441651284694672, + 0.0404607430100441, + 0.039092984050512314, + 0.022661836817860603, + -0.031525854021310806, + -0.00588994100689888, + -0.04010273516178131, + -0.02060783840715885, + -0.0010826417710632086, + 0.03877671808004379, + -0.06889308243989944, + 0.03235398977994919, + 0.05109066143631935, + -0.025291332975029945, + 0.03965287655591965, + 0.0450252890586853, + 0.04019766300916672, + -0.016007697209715843, + -0.03309934586286545, + 0.017057696357369423, + -0.03357882425189018, + 0.11271163821220398, + 0.06507378816604614, + 0.06444886326789856, + -0.05296632647514343, + 0.017478054389357567, + 0.01102539710700512, + -0.11190936714410782, + -0.04654999077320099, + -0.11841487884521484, + -0.04011935740709305, + 0.028015971183776855, + -0.008701558224856853, + -0.03695521503686905, + -0.055591873824596405, + -0.10923856496810913, + -0.06232326850295067, + -0.04594428464770317, + -0.06745697557926178, + 0.08476879447698593, + -0.1037837341427803, + 0.05231177434325218, + -0.027423685416579247, + 0.05338282883167267, + 0.019281374290585518, + 0.04893539845943451, + -0.0033782056998461485, + 0.028989456593990326, + -0.009714988991618156, + 0.11931396275758743, + -0.01698172837495804, + -0.09036172926425934, + -0.07390323281288147, + 0.025474095717072487, + -0.029759317636489868, + 0.02599635347723961, + 0.0011754898587241769, + -0.05139143764972687, + 0.014714285731315613, + 0.0781603530049324, + -0.041339412331581116, + -0.047662075608968735, + 0.08098535239696503, + -0.015095219016075134, + -0.039437130093574524, + 0.0063985297456383705, + -0.008276446722447872, + 0.005368935409933329, + 0.07102296501398087, + -0.12570571899414062, + -0.07577552646398544, + 0.028369830921292305, + 0.025757409632205963, + 0.020101109519600868, + 0.03049715980887413, + 0.03537679836153984, + -0.02382897585630417, + -0.05509920418262482, + -0.027325887233018875, + -0.035454194992780685, + 0.02124050259590149, + 0.031864289194345474, + -0.07738327980041504, + -0.052225176244974136, + 0.039652563631534576, + 0.011446946300566196, + -0.0035048737190663815, + 0.06342972815036774, + 0.07297911494970322, + 0.12298606336116791, + 0.01806425303220749, + 0.0004946099943481386 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": " leading whitespace and multiple spaces ", + "input_ids": [ + 0, + 105207, + 35011, + 65421, + 136, + 48716, + 32628, + 7, + 2 + ], + "embedding": [ + 0.14124684035778046, + 0.052072666585445404, + 0.018342632800340652, + 0.037391819059848785, + 0.022402649745345116, + 0.04674941301345825, + -0.009623203426599503, + -0.051674943417310715, + 0.026735952123999596, + 0.00663175992667675, + 0.025492126122117043, + -0.05074956640601158, + 0.054476700723171234, + -0.07875155657529831, + 0.04957250505685806, + 0.053251657634973526, + -0.04989407956600189, + 0.09917593002319336, + -0.06163206696510315, + 0.03587163984775543, + 0.0008982347208075225, + -0.0658963993191719, + -0.08292202651500702, + -0.05681886523962021, + -0.054768551141023636, + -0.023214364424347878, + 0.0032692006789147854, + -0.0031363910529762506, + 0.03292403370141983, + -0.15256911516189575, + 0.10680984705686569, + -0.01026300061494112, + 0.06458193063735962, + -0.02200217731297016, + 0.020477959886193275, + -0.03877682611346245, + 0.002365277847275138, + 0.04923902824521065, + 0.004234245512634516, + 0.03350735083222389, + -0.013699757866561413, + 0.036254480481147766, + 0.011493132449686527, + 0.031382083892822266, + 0.03901124373078346, + -0.06253635883331299, + -0.0863371193408966, + 0.048271819949150085, + 0.05256575718522072, + -0.11505662649869919, + 0.020640620961785316, + -0.040924206376075745, + -0.05842522531747818, + 0.04119899868965149, + -0.10096454620361328, + 0.007349364459514618, + -0.1063719093799591, + 0.03055928274989128, + -0.02425285428762436, + 0.0032549810130149126, + 0.04025949910283089, + 0.05811697989702225, + -0.06612987816333771, + -0.013494724407792091, + 0.016028745099902153, + -0.06080006808042526, + 0.09156835079193115, + 0.010430919006466866, + -0.06754319369792938, + 0.16538523137569427, + -0.011656424030661583, + -0.005649061407893896, + -0.07148048281669617, + -0.11330394446849823, + 0.11574332416057587, + 0.026722392067313194, + -0.019262854009866714, + 0.04953702539205551, + 0.07770763337612152, + -0.0707242488861084, + 0.02878842130303383, + 0.019877225160598755, + -0.1111823171377182, + 0.03020678088068962, + -0.040011316537857056, + -0.025920039042830467, + 0.01581401564180851, + -0.019337503239512444, + -0.017904283478856087, + -0.04924600571393967, + 0.06428495794534683, + -0.06580159813165665, + -0.053286030888557434, + 0.06868524849414825, + -0.030511444434523582, + -0.04026590660214424, + -0.11225048452615738, + -0.0043768626637756824, + 0.12285447120666504, + 0.07607036828994751, + 0.013010012917220592, + 0.005302204750478268, + 0.059570252895355225, + 0.007567342836409807, + 0.004479400347918272, + 0.039706356823444366, + -0.007867923006415367, + -0.024616895243525505, + 0.021331382915377617, + -0.013403121381998062, + -0.037472765892744064, + 0.0142630310729146, + -0.06965568661689758, + 0.04866688326001167, + -0.04956751689314842, + -0.027930742129683495, + 0.03648056834936142, + 0.00018751132301986217, + 0.05757514759898186, + 0.011978494934737682, + -0.031872376799583435, + 0.006628541741520166, + -0.06495807319879532, + 0.04725617542862892, + 0.025626342743635178, + -0.06045495346188545, + -0.016926776617765427, + -0.009883723221719265, + 0.026484452188014984, + -0.04127120599150658, + 0.014962451532483101, + -0.047491446137428284, + 0.033458683639764786, + 0.09487388283014297, + -0.02103148028254509, + 0.015228509902954102, + -0.0016643200069665909, + 0.03623406961560249, + -0.00012037435953970999, + 0.01260424219071865, + -0.02006606198847294, + 0.028909074142575264, + 0.06211286410689354, + -0.01937672682106495, + 0.14010211825370789, + 0.007474416866898537, + -0.08139558881521225, + -0.02216077409684658, + -0.06428125500679016, + -0.013805633410811424, + -0.06490916758775711, + -0.045329052954912186, + 0.05094083026051521, + -0.030566588044166565, + -0.04056625813245773, + 0.03846843168139458, + -0.004672075621783733, + -0.007332258857786655, + -0.04394453018903732, + 0.042977117002010345, + -0.06525669991970062, + 0.10903175175189972, + 0.05261613056063652, + 0.1045268103480339, + 0.013533745892345905, + -0.026646239683032036, + 0.05809173360466957, + -0.03145575150847435, + -0.09961490333080292, + -0.03328878432512283, + 0.04597281664609909, + 0.047087885439395905, + -0.03989943861961365, + -0.008184295147657394, + -0.0329994298517704, + 0.032200101763010025, + -0.11669545620679855, + 0.06276372075080872, + -0.0053922804072499275, + 0.01962590590119362, + -0.041008125990629196, + -0.001515663811005652, + -0.016144149005413055, + -0.03846326470375061, + -0.05641080066561699, + 0.003967109136283398, + 0.04957253858447075, + 0.06482366472482681, + 0.04354890435934067, + -0.011867312714457512, + -0.0322459414601326, + -0.008506819605827332, + 0.042230211198329926, + 0.006898079998791218, + 0.0020649738144129515, + 0.04069257527589798, + 0.057600609958171844, + 0.0030486576724797487, + 0.007637446280568838, + 0.033355195075273514, + 0.030911514535546303, + 0.048025310039520264, + 0.012274716980755329, + 0.01588570699095726, + -0.017493851482868195, + 0.0016117861960083246, + 0.0037135970778763294, + -0.013322106562554836, + -0.03694523498415947, + 0.05031856149435043, + -0.05664549022912979, + -0.06176158785820007, + -0.04181700572371483, + -0.030001817271113396, + -0.026986246928572655, + 0.04851016774773598, + 0.0639972984790802, + -0.05402400717139244, + -0.06421083956956863, + -0.05367627367377281, + 0.020433790981769562, + 0.060361798852682114, + -0.0718725398182869, + -0.04260745272040367, + -0.008844214491546154, + 0.051352422684431076, + 0.059117719531059265, + -0.03330448269844055, + -0.022172585129737854, + 0.06790079176425934, + 0.10037905722856522, + -0.026286672800779343, + -0.012972958385944366, + 0.07006775587797165, + -5.8461970183998346e-05, + 0.013214468955993652, + 0.06542978435754776, + -0.03544697165489197, + -0.04354533180594444, + -0.03543528541922569, + 0.010808272287249565, + 0.009249728173017502, + -0.026467496529221535, + 0.03884394094347954, + -0.03028864786028862, + 0.1038229912519455, + 0.006369123235344887, + 0.08074084669351578, + -0.0038517762441188097, + 0.05055028200149536, + 0.04516074061393738, + 0.020866449922323227, + -0.06058742105960846, + 0.047169800847768784, + -0.10188274830579758, + 0.0005454531637951732, + 0.09251131862401962, + 0.006306975614279509, + 0.03649565204977989, + -0.020401813089847565, + 0.014838937669992447, + 0.01593077927827835, + -0.07211527973413467, + 0.10454951971769333, + -0.03049602173268795, + 0.02749122679233551, + 0.020738210529088974, + 0.04118208959698677, + 0.10628096759319305, + 0.02532561682164669, + -0.02727043628692627, + 0.03859710693359375, + -0.09465693682432175, + 0.007646556943655014, + -0.14367789030075073, + 0.015038283541798592, + -0.023576760664582253, + 0.012352262623608112, + -0.013415466994047165, + -0.0017623122548684478, + -0.058929577469825745, + -0.010340665467083454, + 0.03266856446862221, + -0.040262456983327866, + 0.040991559624671936, + 0.028829049319028854, + -0.006009071134030819, + 0.035963110625743866, + 0.054469652473926544, + 0.0052152336575090885, + -0.03842409700155258, + -0.07005807757377625, + -0.07431788742542267, + 0.009383310563862324, + -0.03232620283961296, + -0.013587763532996178, + 0.009076264686882496, + 0.04138006269931793, + -0.0822409838438034, + 0.07446587830781937, + 0.048295971006155014, + -0.04856247082352638, + -0.07195054739713669, + 0.07983830571174622, + -0.05095657333731651, + 0.03463530167937279, + 0.014995871111750603, + -0.015545549802482128, + 0.05906824767589569, + 0.03795207291841507, + 0.03265639767050743, + -0.03686867654323578, + -0.06499221175909042, + -0.0003241667291149497, + 0.016253050416707993, + -0.04357847198843956, + 0.06593842804431915, + 0.011531336233019829, + 0.03632940724492073, + -0.08411504328250885, + -0.04258975759148598, + -0.07864280790090561, + -3.766308509511873e-05, + -0.022769097238779068, + 0.007783958688378334, + -0.06326982378959656, + 0.03217596560716629, + 0.032485444098711014, + 0.005786859430372715, + 0.09386040270328522, + 0.053660616278648376, + -0.029109803959727287, + -0.0704909935593605, + -0.0828595757484436, + -0.05484436824917793, + -0.0022420778404921293, + 0.0011635025730356574, + 0.03055056929588318, + -0.017805619165301323, + 0.017028534784913063, + 0.00976918637752533, + -0.011948894709348679, + -0.020532898604869843, + -0.06069497764110565, + 0.034717340022325516, + -0.035426683723926544, + -0.07506433129310608, + 0.04605090618133545, + -0.076711505651474, + -0.09517750144004822, + 0.04628226161003113, + -0.058117207139730453, + 0.025765743106603622, + 0.04787580296397209, + 0.0013843401102349162, + 0.1202181801199913, + -0.01314795296639204, + 0.016980215907096863, + -0.042613137513399124, + 0.023387987166643143, + 0.004584396257996559, + -0.0793333351612091, + 0.04480861499905586, + -0.007649731822311878, + 0.03482406958937645, + -0.008907487615942955, + 0.09918311983346939, + 0.07011010497808456, + 0.01746419072151184, + 0.01635509729385376, + 0.024949343875050545, + -0.022797828540205956, + 0.00571866100654006, + 0.03333013504743576, + 0.013043065555393696, + -0.05182984843850136, + 0.020455054938793182, + -0.027357647195458412, + -0.015433610416948795, + 0.0008398107602261007, + -0.09378573298454285, + -0.009838210418820381, + -0.054633915424346924, + 0.020056676119565964 + ], + "embedding_dim": 384 + }, + { + "model_id": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", + "pooling": "mean", + "prompt_prefix": "", + "input": "短い日本語のテストです。", + "input_ids": [ + 0, + 6, + 10119, + 2111, + 98449, + 154, + 120256, + 1453, + 30, + 2 + ], + "embedding": [ + -0.03689149022102356, + 0.07929513603448868, + -0.005653827916830778, + -0.026826415210962296, + -0.0038383055943995714, + -0.007934244349598885, + 0.03940825164318085, + 0.009313452057540417, + -0.021528366953134537, + 0.05400966480374336, + 0.03270421922206879, + -0.09315811097621918, + 0.09639082849025726, + 0.09045636653900146, + 0.024150095880031586, + -0.025924276560544968, + -0.002754730172455311, + -0.009182916022837162, + 0.024898206815123558, + -0.021148275583982468, + 0.027708662673830986, + -0.0241930540651083, + 0.045249149203300476, + -0.005882841534912586, + 0.044332168996334076, + -0.046761833131313324, + 0.153191477060318, + 0.02512301132082939, + 0.05359293892979622, + 0.0030672757420688868, + -0.1253393292427063, + 0.0164174921810627, + 0.07247230410575867, + -0.01912105455994606, + -0.005839521996676922, + 0.06411517411470413, + 0.040857527405023575, + -0.012406613677740097, + -0.041203953325748444, + -0.027083296328783035, + -0.05301929637789726, + 0.023816846311092377, + 0.09095004945993423, + 0.09269995987415314, + 0.04580577835440636, + 0.07524298131465912, + 0.03035767376422882, + -0.050972361117601395, + -0.10120207071304321, + 0.026468807831406593, + 0.002718961564823985, + -0.030247678980231285, + -0.014914536848664284, + 0.016677478328347206, + 0.11326887458562851, + -0.026735756546258926, + 0.03559037297964096, + -0.028148990124464035, + -0.018208183348178864, + -0.00781203992664814, + -2.215455197074334e-06, + -0.0384596548974514, + -0.02115900255739689, + 0.05800493434071541, + -0.00734356977045536, + -0.016618385910987854, + 0.014240888878703117, + -0.029184268787503242, + -0.022067558020353317, + 0.043720439076423645, + -0.031524334102869034, + -0.04029461741447449, + 0.02905852720141411, + 0.06783539801836014, + -0.07007792592048645, + 0.05251988396048546, + -0.033640798181295395, + 0.03902938589453697, + -0.03439849242568016, + -0.004121392033994198, + 0.017325934022665024, + -0.0029863554518669844, + 0.019030747935175896, + 0.007338503375649452, + 0.026786278933286667, + 0.034564871340990067, + -0.0738491490483284, + 0.0256865955889225, + -0.07047127187252045, + 0.08265899121761322, + 0.0604795478284359, + -0.006944211665540934, + 0.059850241988897324, + 0.05435612425208092, + 0.015298521146178246, + -0.0520513616502285, + 0.036588218063116074, + -0.03522032871842384, + 0.011975070461630821, + 0.1366700381040573, + 0.002145894570276141, + -0.026355480775237083, + -0.010793589055538177, + -0.01787152886390686, + -0.021744906902313232, + -0.015369576402008533, + -0.02474093995988369, + -0.042112600058317184, + 0.019633479416370392, + -0.01879594661295414, + -0.04716907814145088, + -0.016108395531773567, + -0.026436736807227135, + 0.045930542051792145, + -0.028898444026708603, + -0.008403593674302101, + 0.07884109765291214, + 0.029819859191775322, + -0.014546503312885761, + 0.07889978587627411, + 0.01355891115963459, + -0.09390164911746979, + 0.0029270078521221876, + -0.023982368409633636, + -0.03989676386117935, + -0.06593545526266098, + -0.07158759236335754, + 0.05834058299660683, + 0.0639711320400238, + -0.0477747805416584, + -0.0261368490755558, + 0.03189493343234062, + -0.025002939626574516, + -0.0012945589842274785, + -0.044388704001903534, + -0.016024792566895485, + -0.007360307965427637, + 0.031414683908224106, + -0.007383971009403467, + 0.019753459841012955, + -0.08479496836662292, + 0.02831137739121914, + 0.0028847642242908478, + 0.008415009826421738, + -0.02624719776213169, + -0.024966364726424217, + -0.05875623598694801, + 0.0587482675909996, + 0.06453656405210495, + 0.008653511293232441, + 0.07671886682510376, + -0.04115695878863335, + -0.0033028784673660994, + -0.015494335442781448, + -0.009693101979792118, + -0.1273898333311081, + 0.025507638230919838, + 0.03798530623316765, + -0.007178465370088816, + -0.059395864605903625, + -0.1014079600572586, + -0.0038413614965975285, + -0.10357773303985596, + -0.009551097638905048, + 0.06853226572275162, + -0.029829738661646843, + -0.05398091673851013, + -0.0041894265450537205, + -0.0018705615075305104, + 0.005664055235683918, + 0.024324532598257065, + 0.009084905497729778, + 0.051789600402116776, + -0.05485489219427109, + -0.009376563131809235, + -0.024483423680067062, + 0.0070235333405435085, + 0.020923098549246788, + -0.11022046953439713, + -0.06834128499031067, + 0.01671590656042099, + 0.039378367364406586, + -0.016853049397468567, + 0.03281769901514053, + 0.05888286605477333, + -0.02206563763320446, + -0.08191263675689697, + 0.022146085277199745, + -0.016236785799264908, + 0.08507727831602097, + -0.05618574842810631, + -0.0157057736068964, + 0.029502691701054573, + 0.035696495324373245, + -0.051410406827926636, + -0.0876888558268547, + 0.018635224550962448, + -0.07821211218833923, + -0.006962136831134558, + -0.07015377283096313, + -0.025892451405525208, + -0.024244215339422226, + -0.006397189572453499, + -0.05320774391293526, + 0.043224889785051346, + -0.07938016951084137, + 0.036756064742803574, + -0.116958849132061, + 0.008895968087017536, + 0.06374786794185638, + -0.06992118805646896, + 0.046112094074487686, + -0.0808795839548111, + 0.08019785583019257, + 0.11409278213977814, + -0.04374731332063675, + -0.07630395144224167, + -0.042301665991544724, + -0.032110292464494705, + 0.007593470625579357, + -0.0007464100490324199, + -0.10398589074611664, + 0.015660548582673073, + -0.11280778050422668, + -0.008725209161639214, + -0.05354173853993416, + -0.06383276730775833, + 0.07605020701885223, + 0.032174259424209595, + -0.06931592524051666, + 0.07634026557207108, + 0.06106750667095184, + 0.015393231995403767, + -0.013562027364969254, + -0.054575394839048386, + -0.03322182595729828, + -0.03291260823607445, + 0.07269399613142014, + 0.001690167118795216, + 0.007609470747411251, + 0.001083498471416533, + 0.040149837732315063, + 0.017700321972370148, + 0.005223609507083893, + -0.01814384199678898, + -0.011273914948105812, + 0.019218599423766136, + 0.058666907250881195, + -0.05650912970304489, + 0.04977705329656601, + 0.019770465791225433, + -0.05848085135221481, + -0.09515305608510971, + 0.013387889601290226, + 0.023852016776800156, + -0.024223338812589645, + -0.008357776328921318, + 0.06336375325918198, + -0.03344180807471275, + -0.04875249043107033, + 0.06268205493688583, + -0.0453353151679039, + 0.022720927372574806, + 0.03967087343335152, + 0.004244716838002205, + 0.05926850065588951, + 0.057770274579524994, + -0.022637158632278442, + -0.044162239879369736, + 0.02648157626390457, + -0.03783462569117546, + 0.02357620745897293, + 0.003542168764397502, + -0.036699309945106506, + 0.012514151632785797, + 0.0022744787856936455, + 0.0015689203282818198, + -0.022663986310362816, + -0.04726118966937065, + -0.005544360261410475, + -0.07335038483142853, + -0.012981612235307693, + 0.018464315682649612, + 0.01956092193722725, + 0.0003987510863225907, + -0.0669049471616745, + 0.05022555962204933, + -0.004190827254205942, + 0.03193468600511551, + 0.07164262235164642, + 0.05805131793022156, + 0.07845726609230042, + 0.0608520545065403, + -0.03608006611466408, + -0.030927356332540512, + 0.02544359676539898, + 0.05634642764925957, + 0.018072202801704407, + 0.05050988867878914, + -0.02046271413564682, + -0.05027893930673599, + -0.015265836380422115, + -0.028143849223852158, + 0.018592311069369316, + 0.00018492623348720372, + 0.002420445904135704, + -0.016955211758613586, + 0.04678642004728317, + 0.047874338924884796, + -0.024687932804226875, + -0.04299275949597359, + 0.057755712419748306, + 0.02730989269912243, + 0.04006127268075943, + 0.045358806848526, + 0.126377135515213, + 0.0155756501480937, + -0.014726114459335804, + -0.0003234893665648997, + -0.10381314158439636, + -0.010823816061019897, + -0.08657142519950867, + -0.03122592903673649, + 0.010306118987500668, + -0.0049485876224935055, + 0.020172979682683945, + -0.07660383731126785, + -0.15118537843227386, + 0.012864407151937485, + -0.07373926788568497, + -0.0345892459154129, + 0.1251135915517807, + -0.15821173787117004, + 0.0841389074921608, + -0.055600427091121674, + 0.00789330992847681, + 0.07229351252317429, + 0.08886821568012238, + -0.022146081551909447, + 0.013999815098941326, + 0.0924406424164772, + 0.017826473340392113, + -0.019093429669737816, + -0.026330001652240753, + -0.013408901169896126, + 0.13080385327339172, + -0.032857365906238556, + 0.009886321611702442, + -0.061758968979120255, + -0.08751654624938965, + 0.01376569177955389, + 0.08511427789926529, + -0.06403404474258423, + -0.022405430674552917, + -0.001494015334174037, + 0.020800147205591202, + 0.049137938767671585, + -0.0152383828535676, + -0.04100954160094261, + 0.020179245620965958, + -0.0748320072889328, + -0.07247352600097656, + 0.001730962423607707, + 0.05770687758922577, + 0.04049108922481537, + 0.01780865713953972, + -0.10936545580625534, + -0.046485044062137604, + -0.021058714017271996, + 0.03157404810190201, + 0.028712932020425797, + -0.0370747447013855, + 0.011652768589556217, + 0.017270494252443314, + 0.005664888769388199, + 0.09202970564365387, + 0.09120534360408783, + -0.04184575751423836, + -0.032220784574747086, + 0.13666127622127533, + 0.057198911905288696, + 0.08067409694194794, + -0.028934843838214874, + -0.0026519838720560074 + ], + "embedding_dim": 384 + } +] \ No newline at end of file diff --git a/scripts/gen_embed_parity_goldens.py b/scripts/gen_embed_parity_goldens.py index 6ef50ca0..21805c75 100644 --- a/scripts/gen_embed_parity_goldens.py +++ b/scripts/gen_embed_parity_goldens.py @@ -150,6 +150,127 @@ def generate_e5_small_goldens() -> list[dict]: return goldens +def find_hf_cache_snapshot(model_id: str) -> Path | None: + """Return the first existing snapshot dir for a HF model ID, or None.""" + # e.g. "sentence-transformers/all-MiniLM-L6-v2" + # → "~/.cache/huggingface/hub/models--sentence-transformers--all-MiniLM-L6-v2/snapshots//" + slug = "models--" + model_id.replace("/", "--") + snapshots_dir = Path(HOME) / ".cache" / "huggingface" / "hub" / slug / "snapshots" + if snapshots_dir.exists(): + children = sorted(snapshots_dir.iterdir()) + if children: + return children[-1] # latest snapshot + return None + + +def generate_all_minilm_l6_v2_goldens() -> list[dict]: + """ + sentence-transformers/all-MiniLM-L6-v2: mean pooling + L2 normalize, no prompt prefix. + + Reference: https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2 + "Map sentences & paragraphs to a 384-dimensional dense vector space." + WordPiece tokenizer (BERT-base-uncased style), mean pooling with attention mask. + """ + model_id = "sentence-transformers/all-MiniLM-L6-v2" + # Use the HF cache snapshot for full tokenizer config; weights are there too. + model_path = find_hf_cache_snapshot(model_id) + if model_path is None or not (model_path / "model.safetensors").exists(): + # Fallback: .lattice/models/ (weights only — will fail without tokenizer config) + model_path = Path(HOME) / ".lattice" / "models" / "all-minilm-l6-v2" + if not (model_path / "model.safetensors").exists(): + print(f"ERROR: all-MiniLM-L6-v2 not found in HF cache or .lattice/models/") + sys.exit(1) + + print(f"Loading {model_id} from {model_path}...") + + tokenizer = AutoTokenizer.from_pretrained(str(model_path)) + model = AutoModel.from_pretrained(str(model_path)) + model.eval() + + print(f" model type: {type(model).__name__}, hidden_size: {model.config.hidden_size}") + + prompt_prefix = "" + goldens = [] + for text in INPUTS: + inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512) + with torch.no_grad(): + outputs = model(**inputs) + + # Masked mean pool (sentence-transformers convention) + last_hidden = outputs.last_hidden_state # [1, seq_len, hidden] + attention_mask = inputs["attention_mask"].unsqueeze(-1).float() # [1, seq_len, 1] + pooled = (last_hidden * attention_mask).sum(dim=1) / attention_mask.sum(dim=1) + mean_vec = pooled[0].numpy() + embedding = l2_normalize(mean_vec) + + goldens.append({ + "model_id": model_id, + "pooling": "mean", + "prompt_prefix": prompt_prefix, + "input": text, + "input_ids": inputs["input_ids"][0].tolist(), + "embedding": embedding.tolist(), + "embedding_dim": len(embedding), + }) + print(f" [{len(goldens)}/5] '{text[:40]}...' → dim={len(embedding)}, norm={np.linalg.norm(embedding):.6f}") + + return goldens + + +def generate_paraphrase_multilingual_minilm_l12_v2_goldens() -> list[dict]: + """ + sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2: mean pooling + L2 normalize. + + Reference: https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 + "Maps sentences & paragraphs to a 384 dimensional dense vector space." + SentencePiece tokenizer (XLM-R style), mean pooling with attention mask, no prompt prefix. + """ + model_id = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2" + # Use the HF cache snapshot for full tokenizer config; weights are there too. + model_path = find_hf_cache_snapshot(model_id) + if model_path is None or not (model_path / "model.safetensors").exists(): + # Fallback: .lattice/models/ + model_path = Path(HOME) / ".lattice" / "models" / "paraphrase-multilingual-minilm-l12-v2" + if not (model_path / "model.safetensors").exists(): + print(f"ERROR: paraphrase-multilingual-MiniLM-L12-v2 not found in HF cache or .lattice/models/") + sys.exit(1) + + print(f"Loading {model_id} from {model_path}...") + + tokenizer = AutoTokenizer.from_pretrained(str(model_path)) + model = AutoModel.from_pretrained(str(model_path)) + model.eval() + + print(f" model type: {type(model).__name__}, hidden_size: {model.config.hidden_size}") + + prompt_prefix = "" + goldens = [] + for text in INPUTS: + inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512) + with torch.no_grad(): + outputs = model(**inputs) + + # Masked mean pool (sentence-transformers convention) + last_hidden = outputs.last_hidden_state # [1, seq_len, hidden] + attention_mask = inputs["attention_mask"].unsqueeze(-1).float() # [1, seq_len, 1] + pooled = (last_hidden * attention_mask).sum(dim=1) / attention_mask.sum(dim=1) + mean_vec = pooled[0].numpy() + embedding = l2_normalize(mean_vec) + + goldens.append({ + "model_id": model_id, + "pooling": "mean", + "prompt_prefix": prompt_prefix, + "input": text, + "input_ids": inputs["input_ids"][0].tolist(), + "embedding": embedding.tolist(), + "embedding_dim": len(embedding), + }) + print(f" [{len(goldens)}/5] '{text[:40]}...' → dim={len(embedding)}, norm={np.linalg.norm(embedding):.6f}") + + return goldens + + def generate_qwen_goldens() -> list[dict]: """ Qwen/Qwen3-Embedding-0.6B: last-token pooling + L2 normalize. @@ -229,6 +350,18 @@ def main() -> None: write_fixture("multilingual_e5_small.json", e5_goldens) print() + # all-MiniLM-L6-v2 + print("--- all-MiniLM-L6-v2 (mean + L2 norm, no prefix) ---") + minilm_l6_goldens = generate_all_minilm_l6_v2_goldens() + write_fixture("all_minilm_l6_v2.json", minilm_l6_goldens) + print() + + # paraphrase-multilingual-MiniLM-L12-v2 + print("--- paraphrase-multilingual-MiniLM-L12-v2 (mean + L2 norm, no prefix) ---") + paraphrase_goldens = generate_paraphrase_multilingual_minilm_l12_v2_goldens() + write_fixture("paraphrase_multilingual_minilm_l12_v2.json", paraphrase_goldens) + print() + # Qwen3-Embedding-0.6B print("--- Qwen3-Embedding-0.6B (last-token + L2 norm, no prefix) ---") qwen_goldens = generate_qwen_goldens() @@ -239,6 +372,8 @@ def main() -> None: for fname, goldens in [ ("bge_small_en_v15.json", bge_goldens), ("multilingual_e5_small.json", e5_goldens), + ("all_minilm_l6_v2.json", minilm_l6_goldens), + ("paraphrase_multilingual_minilm_l12_v2.json", paraphrase_goldens), ("qwen3_embedding_0_6b.json", qwen_goldens), ]: path = FIXTURE_DIR / fname