21 #include <cudf/utilities/export.hpp>
24 namespace CUDF_EXPORT
nvtext {
36 uint16_t first_token_id{};
37 uint16_t separator_token_id{};
38 uint16_t unknown_token_id{};
39 uint32_t outer_hash_a{};
40 uint32_t outer_hash_b{};
42 std::unique_ptr<cudf::column>
table;
48 std::unique_ptr<cudf::column>
50 std::unique_ptr<cudf::column>
70 std::string
const& filename_hashed_vocabulary,
81 uint32_t nrows_tensor{};
85 uint32_t sequence_length{};
159 uint32_t max_sequence_length,
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
Class definition for cudf::column.
column view class definitions
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
tokenizer_result subword_tokenize(cudf::strings_column_view const &strings, hashed_vocabulary const &vocabulary_table, uint32_t max_sequence_length, uint32_t stride, bool do_lower_case, bool do_truncate, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Creates a tokenizer that cleans the text, splits it into tokens and returns token-ids from an input v...
std::unique_ptr< hashed_vocabulary > load_vocabulary_file(std::string const &filename_hashed_vocabulary, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Load the hashed vocabulary file into device memory.
Class definition for cudf::strings_column_view.
The vocabulary data for use with the subword_tokenize function.
std::unique_ptr< cudf::column > bin_coefficients
std::unique_ptr< cudf::column > aux_cp_table
uint64 column, The auxiliary code point table to use for normalization
std::unique_ptr< cudf::column > bin_offsets
std::unique_ptr< cudf::column > table
std::unique_ptr< cudf::column > cp_metadata
uint32 column, The code point metadata table to use for normalization
Result object for the subword_tokenize functions.
std::unique_ptr< cudf::column > tensor_token_ids
A vector of token-ids for each row.
std::unique_ptr< cudf::column > tensor_metadata
The metadata for each tensor row.
std::unique_ptr< cudf::column > tensor_attention_mask
This mask identifies which tensor-token-ids are valid.