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
↓ 12 callers
Method
set_layer_norm
(self, spec, layer_norm)
python/ctranslate2/converters/transformers.py:4264
↓ 12 callers
Function
set_linear
(spec, module)
python/ctranslate2/converters/fairseq.py:287
↓ 12 callers
Function
set_linear
(spec, variables, scope)
python/ctranslate2/converters/opennmt_py.py:336
↓ 12 callers
Function
synchronize_stream
src/devices.cc:113
↓ 11 callers
Function
_get_model_path
()
python/tests/test_translator.py:15
↓ 11 callers
Function
add
src/cpu/kernels.cc:265
↓ 11 callers
Function
exp
Exponential function. This function is exact to rounding for all rounding modes. See also:** Documentation for [std::exp](https://en.cppreference.com
include/half_float/half.hpp:2936
↓ 11 callers
Function
make_sequence_inputs
src/layers/common.cc:12
↓ 11 callers
Function
pow
Power function. This function may be 1 ULP off the correctly rounded exact result for any rounding mode in ~0.00025% of inputs. See also:** Documenta
include/half_float/half.hpp:3427
↓ 11 callers
Function
set_linear
(spec, variables, scope)
python/ctranslate2/converters/eole_ct2.py:323
↓ 11 callers
Function
sub
src/cpu/kernels.cc:279
↓ 11 callers
Method
update_output_layer
src/layers/decoder.cc:72
↓ 11 callers
Method
validate
(self)
python/ctranslate2/converters/utils.py:125
↓ 10 callers
Method
boolean
include/nlohmann/json.hpp:7234
↓ 10 callers
Method
get
! @brief get next character from the input This function provides the interface to the used input adapter. It does not throw in case the
include/nlohmann/json.hpp:11826
↓ 10 callers
Function
log2
Fixed point binary logarithm. This uses the BKM algorithm in L-mode. \param m mantissa in [1,2) as Q1.30 \param n number of iterations (at most 32) \r
include/half_float/half.hpp:1531
↓ 10 callers
Function
open_file_read
src/filesystem.cc:37
↓ 10 callers
Function
parser
include/nlohmann/json.hpp:19306
↓ 10 callers
Function
replicate_heads
src/layers/attention.cc:291
↓ 10 callers
Method
set_layer_norm
(self, spec, module)
python/ctranslate2/converters/transformers.py:1225
↓ 10 callers
Function
set_parent
include/nlohmann/json.hpp:19921
↓ 10 callers
Function
sqrt
include/half_float/half.hpp:1480
↓ 10 callers
Method
sync_copy
src/storage_view.cc:304
↓ 10 callers
Method
to_id
src/vocabulary.cc:67
↓ 10 callers
Method
translate_file
python/cpp/translator.cc:32
↓ 10 callers
Method
validate
Verify that the required weights are set. Raises: ValueError: If a required weight is not set in the specification.
python/ctranslate2/specs/model_spec.py:101
↓ 9 callers
Method
apply
src/decoding_utils.cc:19
↓ 9 callers
Method
end_array
include/nlohmann/json.hpp:7284
↓ 9 callers
Function
find
include/nlohmann/json.hpp:19166
↓ 9 callers
Method
get_flag_with_default
src/models/model.cc:269
↓ 9 callers
Function
get_gemm_backend
src/cpu/backend.cc:50
↓ 9 callers
Function
is_binary
@brief return whether value is a binary array @sa https://json.nlohmann.me/api/basic_json/is_binary/
include/nlohmann/json.hpp:20543
↓ 9 callers
Method
register_source_vocabulary
Registers a source vocabulary of tokens. Arguments: tokens: List of source tokens.
python/ctranslate2/specs/model_spec.py:488
↓ 9 callers
Method
register_target_vocabulary
Registers a target vocabulary of tokens. Arguments: tokens: List of target tokens.
python/ctranslate2/specs/model_spec.py:496
↓ 9 callers
Method
remove_padding
src/padder.cc:56
↓ 9 callers
Method
score_batch
python/cpp/generator.cc:81
↓ 9 callers
Function
sign_mask
Platform-independent sign mask. \param arg integer value in two's complement \retval -1 if \a arg negative \retval 0 if \a arg positive
include/half_float/half.hpp:591
↓ 9 callers
Method
start_array
include/nlohmann/json.hpp:7279
↓ 9 callers
Method
stride
include/ctranslate2/storage_view.h:131
↓ 9 callers
Method
string
include/nlohmann/json.hpp:7254
↓ 9 callers
Method
to_ids
src/vocabulary.cc:97
↓ 8 callers
Function
_get_variable
(variables, name)
python/ctranslate2/converters/opennmt_py.py:351
↓ 8 callers
Function
_get_variable
(variables, name)
python/ctranslate2/converters/eole_ct2.py:338
↓ 8 callers
Method
convert_from_args
Helper function to call :meth:`ctranslate2.converters.Converter.convert` with the parsed command line options. Arguments: a
python/ctranslate2/converters/converter.py:40
↓ 8 callers
Method
declare_arguments
Adds common conversion options to the command line parser. Arguments: parser: Command line argument parser.
python/ctranslate2/converters/converter.py:15
↓ 8 callers
Function
decode
src/decoding.cc:1306
↓ 8 callers
Method
device
python/cpp/replica_pool.h:77
↓ 8 callers
Function
divide64
64-bit division. \param x upper 32 bit of dividend \param y divisor \param s variable to store sticky bit for rounding \return (\a x << 32) / \a y
include/half_float/half.hpp:1380
↓ 8 callers
Function
dump_integer
include/nlohmann/json.hpp:18598
↓ 8 callers
Method
effective_compute_type
include/ctranslate2/models/model.h:79
↓ 8 callers
Method
end_object
include/nlohmann/json.hpp:7274
↓ 8 callers
Function
gemm
include/ctranslate2/ops/flash-attention/utils.h:139
↓ 8 callers
Function
is_eos
include/ctranslate2/decoding_utils.h:31
↓ 8 callers
Function
ldexp
Multiply by power of two. This function is exact to rounding for all rounding modes. See also:** Documentation for [std::ldexp](https://en.cppreferen
include/half_float/half.hpp:4211
↓ 8 callers
Function
load_vocabulary
src/models/model_reader.cc:79
↓ 8 callers
Function
multiply64
64-bit multiplication. \param x first factor \param y second factor \return upper 32 bit of \a x * \a y rounded to nearest
include/half_float/half.hpp:1366
↓ 8 callers
Method
output_layer_is_updated
include/ctranslate2/layers/decoder.h:59
↓ 8 callers
Method
output_size
src/layers/common.cc:60
↓ 8 callers
Method
preferred_size_multiple
include/ctranslate2/models/model.h:83
↓ 8 callers
Function
rand_vector
tests/benchmark_utils.h:39
↓ 8 callers
Function
set_layer_norm
(spec, module)
python/ctranslate2/converters/fairseq.py:282
↓ 8 callers
Method
start_object
include/nlohmann/json.hpp:7264
↓ 7 callers
Function
_create_vocab
(tmp_dir, name="vocab", size=10)
python/tests/test_opennmt_tf.py:103
↓ 7 callers
Method
apply
src/layers/attention_layer.cc:213
↓ 7 callers
Function
compares_unordered
include/nlohmann/json.hpp:22843
↓ 7 callers
Function
default_model_dir
tests/test_utils.cc:9
↓ 7 callers
Method
dump
! @brief internal implementation of the serialization function This function is called by the public member function dump and organizes t
include/nlohmann/json.hpp:17991
↓ 7 callers
Method
encode
python/cpp/whisper.cc:26
↓ 7 callers
Function
exp2
Fixed point binary exponential. This uses the BKM algorithm in E-mode. \param m exponent in [0,1) as Q0.31 \param n number of iterations (at most 32)
include/half_float/half.hpp:1504
↓ 7 callers
Method
has_attention
include/ctranslate2/translation.h:143
↓ 7 callers
Method
has_scores
include/ctranslate2/generation.h:90
↓ 7 callers
Function
if
include/nlohmann/json.hpp:22814
↓ 7 callers
Function
load_examples
src/batch_reader.cc:158
↓ 7 callers
Method
optimize
Recursively applies some optimizations to this layer: * Alias variables with the same shape and value. * Quantize weights. A
python/ctranslate2/specs/model_spec.py:262
↓ 7 callers
Method
put
src/thread_pool.cc:37
↓ 7 callers
Function
set_layer_norm
(spec, variables, scope)
python/ctranslate2/converters/eole_ct2.py:310
↓ 7 callers
Method
set_layer_norm
(self, spec, layer_norm)
python/ctranslate2/converters/transformers.py:1988
↓ 7 callers
Method
set_layer_norm
(self, spec, layer_norm)
python/ctranslate2/converters/transformers.py:2260
↓ 7 callers
Function
set_linear
(spec, weights, scope, suffix="", reuse_weight=None)
python/ctranslate2/converters/marian.py:260
↓ 7 callers
Method
set_linear
(self, spec, module)
python/ctranslate2/converters/opennmt_tf.py:305
↓ 7 callers
Method
set_position_encodings
(self, spec, module)
python/ctranslate2/converters/transformers.py:253
↓ 7 callers
Function
str_to_batch_type
src/batch_reader.cc:10
↓ 7 callers
Method
to_original_word_id
include/ctranslate2/layers/decoder.h:71
↓ 7 callers
Function
unsupported_compute_type
src/types.cc:151
↓ 6 callers
Method
__init__
(self, glu=False, rms_norm=False)
python/ctranslate2/specs/transformer_spec.py:444
↓ 6 callers
Function
_get_model_path_with_vmap
(tmp_dir, tokens)
python/tests/test_translator.py:21
↓ 6 callers
Method
allocate
src/cpu/allocator.cc:56
↓ 6 callers
Function
apply_bias_and_activation
activation_type(x + bias + residual)
src/ops/gemm.cc:11
↓ 6 callers
Function
compsignal
Check and signal for any NaN. \param x first half-precision value to check \param y second half-precision value to check \retval true if either \a x o
include/half_float/half.hpp:679
↓ 6 callers
Method
contains
src/vocabulary.cc:56
↓ 6 callers
Function
convert
can't use conversion operator because of ambiguity
include/nlohmann/json.hpp:14516
↓ 6 callers
Function
device_to_str
src/devices.cc:33
↓ 6 callers
Function
eprint
(*args, **kwargs)
tools/tune_inter_intra.py:8
↓ 6 callers
Method
forward
src/models/language_model.cc:66
↓ 6 callers
Method
forward_batch_async
src/encoder.cc:5
↓ 6 callers
Method
free
src/cpu/allocator.cc:63
↓ 6 callers
Function
gather_beam_flat
src/decoding.cc:15
↓ 6 callers
Function
get_cuda_stream
src/cuda/utils.cc:122
↓ 6 callers
Method
get_next
src/batch_reader.cc:82
↓ 6 callers
Method
initialize
src/models/whisper.cc:25
← previous
next →
101–200 of 2,508, ranked by callers