Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenNMT/CTranslate2
/ functions
Functions
2,508 in github.com/OpenNMT/CTranslate2
⨍
Functions
2,508
◇
Types & classes
601
↳
Endpoints
4
↓ 341 callers
Method
size
src/vocabulary.cc:77
↓ 274 callers
Method
dim
include/ctranslate2/storage_view.h:124
↓ 220 callers
Method
dtype
Actual storage type.
include/ctranslate2/storage_view.h:99
↓ 215 callers
Method
device
src/profiler.cc:64
↓ 209 callers
Method
set_linear
(self, spec, module, quant_type=common_spec.Quantization.CT2)
python/ctranslate2/converters/transformers.py:237
↓ 206 callers
Method
to
src/storage_view.cc:90
↓ 180 callers
Function
create
include/nlohmann/json.hpp:19551
↓ 166 callers
Method
join
src/thread_pool.cc:105
↓ 162 callers
Method
end
return iterator end (needed for range-based for)
include/nlohmann/json.hpp:5261
↓ 146 callers
Method
begin
return iterator begin (needed for range-based for)
include/nlohmann/json.hpp:5255
↓ 144 callers
Function
expect_storage_eq
tests/test_utils.h:63
↓ 140 callers
Function
concat
include/nlohmann/json.hpp:4277
↓ 131 callers
Method
write_character
include/nlohmann/json.hpp:14846
↓ 126 callers
Function
to_string
@brief return a string representation of the JSON pointer @sa https://json.nlohmann.me/api/json_pointer/to_string/
include/nlohmann/json.hpp:13749
↓ 122 callers
Method
data
src/storage_view.cc:317
↓ 118 callers
Method
size
include/nlohmann/json.hpp:3109
↓ 99 callers
Method
empty
include/ctranslate2/batch_reader.h:143
↓ 93 callers
Method
shape
(self)
python/ctranslate2/specs/model_spec.py:632
↓ 71 callers
Method
get
src/thread_pool.cc:46
↓ 68 callers
Method
rank
include/ctranslate2/storage_view.h:116
↓ 62 callers
Method
to_float32
src/storage_view.cc:129
↓ 62 callers
Method
translate_batch
src/translator.cc:45
↓ 61 callers
Method
set_layer_norm
(self, spec, layer_norm)
python/ctranslate2/converters/transformers.py:1352
↓ 59 callers
Function
max
src/cpu/kernels.cc:298
↓ 54 callers
Method
at
src/cpu/primitives.cc:40
↓ 54 callers
Function
copy
include/ctranslate2/ops/flash-attention/utils.h:299
↓ 53 callers
Method
size
include/ctranslate2/storage_view.h:138
↓ 52 callers
Function
signal
Signal and silence signaling NaN. \param nan half-precision NaN value \return quiet NaN \exception FE_INVALID if \a nan is signaling NaN
include/half_float/half.hpp:691
↓ 51 callers
Method
dtype
(self)
python/ctranslate2/specs/model_spec.py:640
↓ 49 callers
Function
get
include/nlohmann/json.hpp:5271
↓ 44 callers
Function
add
add a character to token_buffer
include/nlohmann/json.hpp:8702
↓ 44 callers
Method
parse_error
include/nlohmann/json.hpp:4439
↓ 44 callers
Function
string
include/nlohmann/json.hpp:6785
↓ 43 callers
Function
parallel_for
src/cpu/parallel.h:39
↓ 42 callers
Method
empty
include/nlohmann/json.hpp:6236
↓ 42 callers
Function
type_name
@brief return the type as string @sa https://json.nlohmann.me/api/basic_json/type_name/
include/nlohmann/json.hpp:23328
↓ 41 callers
Method
numpy
(self)
python/ctranslate2/specs/model_spec.py:649
↓ 39 callers
Function
default_translator
tests/translator_test.cc:102
↓ 38 callers
Method
convert
Converts the model to the CTranslate2 format. Arguments: output_dir: Output directory where the CTranslate2 model is saved.
python/ctranslate2/converters/converter.py:57
↓ 38 callers
Method
value
return value of the iterator
include/nlohmann/json.hpp:5228
↓ 37 callers
Function
basic_json
@brief create an empty value with a given type @sa https://json.nlohmann.me/api/basic_json/basic_json/
include/nlohmann/json.hpp:19983
↓ 36 callers
Method
set_embeddings
(self, spec, module)
python/ctranslate2/converters/transformers.py:250
↓ 35 callers
Function
min
src/cpu/kernels.cc:312
↓ 34 callers
Function
is_object
@brief return whether value is an object @sa https://json.nlohmann.me/api/basic_json/is_object/
include/nlohmann/json.hpp:20522
↓ 34 callers
Function
size
@brief returns the number of elements @sa https://json.nlohmann.me/api/basic_json/size/
include/nlohmann/json.hpp:22114
↓ 33 callers
Method
register_vocabulary
Registers the vocabulary of tokens. Arguments: tokens: List of tokens.
python/ctranslate2/specs/model_spec.py:594
↓ 32 callers
Method
from_config
Creates the converter from the configuration. Arguments: config: Path to the YAML configuration, or a dictionary with the loaded co
python/ctranslate2/converters/opennmt_tf.py:22
↓ 32 callers
Method
get_vocabulary
(self, model, tokenizer)
python/ctranslate2/converters/transformers.py:1257
↓ 30 callers
Method
key
include/nlohmann/json.hpp:7269
↓ 30 callers
Function
mul
src/cpu/kernels.cc:284
↓ 28 callers
Function
get_token_string
return the last read token (for errors only). Will never contain EOF (an arbitrary value that is not a valid char value, often -1), because 255 may l
include/nlohmann/json.hpp:8749
↓ 28 callers
Function
invalid
Raise domain error and return NaN. return quiet NaN \exception FE_INVALID
include/half_float/half.hpp:743
↓ 27 callers
Function
_get_transliterator
()
python/tests/test_translator.py:29
↓ 26 callers
Function
raise
Raise floating-point exception. \param flags exceptions to raise \param cond condition to raise exceptions for
include/half_float/half.hpp:625
↓ 24 callers
Function
end
@brief returns an iterator to one past the last element @sa https://json.nlohmann.me/api/basic_json/end/
include/nlohmann/json.hpp:21961
↓ 24 callers
Function
log
Natural logarithm. This function is exact to rounding for all rounding modes. See also:** Documentation for [std::log](https://en.cppreference.com/w/
include/half_float/half.hpp:3050
↓ 23 callers
Method
get_variable_if_exists
src/models/model.cc:236
↓ 23 callers
Function
input_adapter
include/nlohmann/json.hpp:6451
↓ 23 callers
Function
isnan
Check for NaN. See also:** Documentation for [std::isnan](https://en.cppreference.com/w/cpp/numeric/math/isnan). \param arg number to check \retval tr
include/half_float/half.hpp:4385
↓ 23 callers
Method
translate_batch
python/cpp/translator.cc:120
↓ 21 callers
Method
get
src/layers/decoder.cc:147
↓ 21 callers
Function
swap
@brief exchanges the values @sa https://json.nlohmann.me/api/basic_json/swap/
include/nlohmann/json.hpp:22632
↓ 20 callers
Function
assert_vector_eq
tests/test_utils.h:56
↓ 20 callers
Function
index_vector
include/ctranslate2/utils.h:36
↓ 20 callers
Method
sax_parse
include/nlohmann/json.hpp:12259
↓ 19 callers
Method
add
src/cpu/vec.h:115
↓ 19 callers
Method
decode
src/decoding.cc:263
↓ 19 callers
Method
number_integer
include/nlohmann/json.hpp:7239
↓ 19 callers
Method
operator[]
access to successor
include/nlohmann/json.hpp:13651
↓ 18 callers
Function
from_json
include/nlohmann/json.hpp:4593
↓ 18 callers
Method
number_unsigned
include/nlohmann/json.hpp:7244
↓ 18 callers
Method
output_type
src/layers/common.cc:56
↓ 18 callers
Method
to
(self, dtype: str)
python/ctranslate2/specs/model_spec.py:643
↓ 17 callers
Function
abs
Absolute value. See also:** Documentation for [std::abs](https://en.cppreference.com/w/cpp/numeric/math/fabs). \param arg operand \return absolute val
include/half_float/half.hpp:2735
↓ 17 callers
Method
get_token_string
! @return a string representation of the last read byte */
include/nlohmann/json.hpp:11975
↓ 17 callers
Method
load
src/cpu/vec.h:20
↓ 17 callers
Function
to_json
include/nlohmann/json.hpp:5571
↓ 16 callers
Function
is_array
@brief return whether value is an array @sa https://json.nlohmann.me/api/basic_json/is_array/
include/nlohmann/json.hpp:20529
↓ 15 callers
Function
begin
@brief returns an iterator to the first element @sa https://json.nlohmann.me/api/basic_json/begin/
include/nlohmann/json.hpp:21936
↓ 15 callers
Method
buffer
src/storage_view.cc:308
↓ 15 callers
Function
clear
@brief clears the contents @sa https://json.nlohmann.me/api/basic_json/clear/
include/nlohmann/json.hpp:22197
↓ 15 callers
Function
combine
boost::hash_combine
include/nlohmann/json.hpp:5933
↓ 15 callers
Method
get_scoped_device_setter
include/ctranslate2/models/model.h:111
↓ 15 callers
Function
is_null
@brief return whether value is null @sa https://json.nlohmann.me/api/basic_json/is_null/
include/nlohmann/json.hpp:20480
↓ 14 callers
Method
is_scalar
include/ctranslate2/storage_view.h:144
↓ 14 callers
Function
mayiuse_mkl
src/cpu/backend.cc:28
↓ 14 callers
Function
select
Select value or signaling NaN. \param x preferred half-precision value \param y ignored half-precision value except for signaling NaN \return \a y if
include/half_float/half.hpp:731
↓ 14 callers
Function
set_parents
include/nlohmann/json.hpp:19871
↓ 13 callers
Method
add_padding
src/padder.cc:66
↓ 13 callers
Method
generate_batch
python/cpp/generator.cc:14
↓ 13 callers
Method
initial_state
src/layers/transformer.cc:537
↓ 13 callers
Method
num_hypotheses
include/ctranslate2/translation.h:135
↓ 13 callers
Function
replace
src/models/transformer.cc:8
↓ 12 callers
Function
device_cast
src/cuda/helpers.h:64
↓ 12 callers
Function
dtype_name
src/types.cc:14
↓ 12 callers
Function
get_device_index
src/devices.cc:91
↓ 12 callers
Method
get_stream
src/batch_reader.cc:28
↓ 12 callers
Method
number_float
include/nlohmann/json.hpp:7249
↓ 12 callers
Function
pole
Raise pole error and return infinity. \param sign half-precision value with sign bit only \return half-precision infinity with sign of \a sign \except
include/half_float/half.hpp:755
↓ 12 callers
Method
set_layer_norm
(self, spec, layer_norm)
python/ctranslate2/converters/transformers.py:3813
next →
1–100 of 2,508, ranked by callers