Lines Matching refs:embeddings
1445 std::vector<float> embeddings; in TEST_F() local
1448 EXPECT_TRUE(embedder.EmbedTokensPerMessage(tokens, &embeddings, in TEST_F()
1452 EXPECT_EQ(embeddings.size(), 3); in TEST_F()
1453 EXPECT_THAT(embeddings[0], FloatEq(tc3farmhash::Fingerprint64("a", 1) % in TEST_F()
1455 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1457 EXPECT_THAT(embeddings[2], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1466 std::vector<float> embeddings; in TEST_F() local
1469 EXPECT_TRUE(embedder.EmbedTokensPerMessage(tokens, &embeddings, in TEST_F()
1473 EXPECT_EQ(embeddings.size(), 5); in TEST_F()
1474 EXPECT_THAT(embeddings[0], FloatEq(tc3farmhash::Fingerprint64("a", 1) % in TEST_F()
1476 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1478 EXPECT_THAT(embeddings[2], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1480 EXPECT_THAT(embeddings[3], FloatEq(options_->padding_token_id)); in TEST_F()
1481 EXPECT_THAT(embeddings[4], FloatEq(options_->padding_token_id)); in TEST_F()
1489 std::vector<float> embeddings; in TEST_F() local
1492 EXPECT_TRUE(embedder.EmbedTokensPerMessage(tokens, &embeddings, in TEST_F()
1496 EXPECT_EQ(embeddings.size(), 2); in TEST_F()
1497 EXPECT_THAT(embeddings[0], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1499 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1508 std::vector<float> embeddings; in TEST_F() local
1511 EXPECT_TRUE(embedder.EmbedTokensPerMessage(tokens, &embeddings, in TEST_F()
1515 EXPECT_THAT(embeddings[0], FloatEq(tc3farmhash::Fingerprint64("a", 1) % in TEST_F()
1517 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1519 EXPECT_THAT(embeddings[2], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1521 EXPECT_THAT(embeddings[3], FloatEq(tc3farmhash::Fingerprint64("d", 1) % in TEST_F()
1523 EXPECT_THAT(embeddings[4], FloatEq(tc3farmhash::Fingerprint64("e", 1) % in TEST_F()
1525 EXPECT_THAT(embeddings[5], FloatEq(options_->padding_token_id)); in TEST_F()
1532 std::vector<float> embeddings; in TEST_F() local
1536 embedder.EmbedAndFlattenTokens(tokens, &embeddings, &total_token_count)); in TEST_F()
1539 EXPECT_EQ(embeddings.size(), 5); in TEST_F()
1540 EXPECT_THAT(embeddings[0], FloatEq(options_->start_token_id)); in TEST_F()
1541 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("a", 1) % in TEST_F()
1543 EXPECT_THAT(embeddings[2], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1545 EXPECT_THAT(embeddings[3], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1547 EXPECT_THAT(embeddings[4], FloatEq(options_->end_token_id)); in TEST_F()
1555 std::vector<float> embeddings; in TEST_F() local
1559 embedder.EmbedAndFlattenTokens(tokens, &embeddings, &total_token_count)); in TEST_F()
1562 EXPECT_EQ(embeddings.size(), 7); in TEST_F()
1563 EXPECT_THAT(embeddings[0], FloatEq(options_->start_token_id)); in TEST_F()
1564 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("a", 1) % in TEST_F()
1566 EXPECT_THAT(embeddings[2], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1568 EXPECT_THAT(embeddings[3], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1570 EXPECT_THAT(embeddings[4], FloatEq(options_->end_token_id)); in TEST_F()
1571 EXPECT_THAT(embeddings[5], FloatEq(options_->padding_token_id)); in TEST_F()
1572 EXPECT_THAT(embeddings[6], FloatEq(options_->padding_token_id)); in TEST_F()
1580 std::vector<float> embeddings; in TEST_F() local
1584 embedder.EmbedAndFlattenTokens(tokens, &embeddings, &total_token_count)); in TEST_F()
1587 EXPECT_EQ(embeddings.size(), 3); in TEST_F()
1588 EXPECT_THAT(embeddings[0], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1590 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1592 EXPECT_THAT(embeddings[2], FloatEq(options_->end_token_id)); in TEST_F()
1600 std::vector<float> embeddings; in TEST_F() local
1604 embedder.EmbedAndFlattenTokens(tokens, &embeddings, &total_token_count)); in TEST_F()
1607 EXPECT_EQ(embeddings.size(), 9); in TEST_F()
1608 EXPECT_THAT(embeddings[0], FloatEq(options_->start_token_id)); in TEST_F()
1609 EXPECT_THAT(embeddings[1], FloatEq(tc3farmhash::Fingerprint64("a", 1) % in TEST_F()
1611 EXPECT_THAT(embeddings[2], FloatEq(tc3farmhash::Fingerprint64("b", 1) % in TEST_F()
1613 EXPECT_THAT(embeddings[3], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1615 EXPECT_THAT(embeddings[4], FloatEq(options_->end_token_id)); in TEST_F()
1616 EXPECT_THAT(embeddings[5], FloatEq(options_->start_token_id)); in TEST_F()
1617 EXPECT_THAT(embeddings[6], FloatEq(tc3farmhash::Fingerprint64("d", 1) % in TEST_F()
1619 EXPECT_THAT(embeddings[7], FloatEq(tc3farmhash::Fingerprint64("e", 1) % in TEST_F()
1621 EXPECT_THAT(embeddings[8], FloatEq(options_->end_token_id)); in TEST_F()
1631 std::vector<float> embeddings; in TEST_F() local
1635 embedder.EmbedAndFlattenTokens(tokens, &embeddings, &total_token_count)); in TEST_F()
1638 EXPECT_EQ(embeddings.size(), 7); in TEST_F()
1639 EXPECT_THAT(embeddings[0], FloatEq(tc3farmhash::Fingerprint64("c", 1) % in TEST_F()
1641 EXPECT_THAT(embeddings[1], FloatEq(options_->end_token_id)); in TEST_F()
1642 EXPECT_THAT(embeddings[2], FloatEq(options_->start_token_id)); in TEST_F()
1643 EXPECT_THAT(embeddings[3], FloatEq(tc3farmhash::Fingerprint64("d", 1) % in TEST_F()
1645 EXPECT_THAT(embeddings[4], FloatEq(tc3farmhash::Fingerprint64("e", 1) % in TEST_F()
1647 EXPECT_THAT(embeddings[5], FloatEq(tc3farmhash::Fingerprint64("f", 1) % in TEST_F()
1649 EXPECT_THAT(embeddings[6], FloatEq(options_->end_token_id)); in TEST_F()