#pragma once #include "replica_pool.h" #include "models/language_model.h" namespace ctranslate2 { // Encoder is the high-level class to embed texts with language models. class Encoder : public ReplicaPool { public: using ReplicaPool::ReplicaPool; std::future forward_batch_async(std::vector> tokens, std::vector> token_type_ids = {}); std::future forward_batch_async(std::vector> ids, std::vector> token_type_ids = {}); std::future forward_batch_async(const StorageView& ids, const StorageView& lengths, std::vector> token_type_ids = {}); }; }