|
| | TextGenerationNetwork () |
| |
| | TextGenerationNetwork (Index, Index, Index, Index, Index, Index, bool pre_normalization=false, bool scale_embedding=true, bool learned_positional=false, const string &feed_forward_activation="ReLU") |
| |
| | TextGenerationNetwork (const filesystem::path &) |
| |
| void | load_pretrained (const filesystem::path &data_directory) |
| |
| Index | get_sequence_length () const |
| |
| void | set_dropout_rate (const float) |
| |
| void | set_attention_sdpa_auto (bool new_sdpa_auto) |
| |
| void | set_tokenizer (unique_ptr< TokenizerOperator >) |
| |
| void | set_vocabulary (const vector< string > &) |
| |
| const TokenizerOperator * | get_tokenizer () const |
| |
| | Network () |
| |
| virtual | ~Network ()=default |
| |
| | Network (const filesystem::path &) |
| |
| NetworkTask | get_task () const noexcept |
| |
| void | set_task (NetworkTask new_task) noexcept |
| |
| Index | add_layer (unique_ptr< Layer >, const vector< Index > &={}) |
| |
| const EffectiveConfig & | get_config () const noexcept |
| |
| Device | get_device () const noexcept |
| |
| bool | is_gpu () const noexcept |
| |
| Type | get_training_type () const noexcept |
| |
| const PrecisionPlan & | get_precision () const noexcept |
| |
| Type | get_activation_type () const noexcept |
| |
| void | set_training_activation_recomputation (bool enabled) noexcept |
| |
| bool | get_training_activation_recomputation () const noexcept |
| |
| void | warn_if_stale_configuration () const |
| |
| vector< vector< TensorSpec > > | get_parameter_specs () const |
| |
| vector< vector< TensorSpec > > | get_state_specs () const |
| |
| vector< vector< TensorSpec > > | get_forward_specs (Index batch_size) const |
| |
| vector< vector< TensorSpec > > | get_backward_specs (Index batch_size) const |
| |
| Index | get_states_size () const |
| |
| void | compile () |
| |
| void | compile (Device device) |
| |
| void | set_attention_sdpa_auto (bool) |
| |
| void | set_attention_sdpa_min_sequence_length (Index) |
| |
| bool | has (const string &) const |
| |
| bool | has (LayerType) const |
| |
| bool | has_recurrent_layers () const |
| |
| bool | is_empty () const noexcept |
| |
| uint64_t | get_parameters_version () const noexcept |
| |
| void | mark_parameters_changed () noexcept |
| |
| float * | get_parameters_data () |
| |
| const float * | get_parameters_data () const |
| |
| VectorMap | get_parameters_map () & |
| |
| ConstVectorMap | get_parameters_map () const & |
| |
| Index | get_parameters_buffer_size () const noexcept |
| |
| Device | get_parameters_device () const noexcept |
| |
| float * | get_states_data () |
| |
| const float * | get_states_data () const |
| |
| Index | get_states_buffer_size () const noexcept |
| |
| const vector< Variable > & | get_input_variables () const noexcept |
| |
| vector< string > | get_input_feature_names () const |
| |
| const vector< Variable > & | get_output_variables () const noexcept |
| |
| vector< string > | get_output_feature_names () const |
| |
| const vector< unique_ptr< Layer > > & | get_layers () const noexcept |
| |
| const unique_ptr< Layer > & | get_layer (const Index layer_index) const |
| |
| const unique_ptr< Layer > & | get_layer (const string &) const |
| |
| Index | get_layer_index (const string &) const |
| |
| const vector< vector< Index > > & | get_source_layers () const noexcept |
| |
| vector< vector< pair< size_t, size_t > > > | get_consumer_edges () const |
| |
| Layer * | get_first (const string &) |
| |
| Layer * | get_first (LayerType) |
| |
| const Layer * | get_first (const string &) const |
| |
| const Layer * | get_first (LayerType) const |
| |
| void | set_input_variables (const vector< Variable > &new_input_variables) |
| |
| void | set_output_variables (const vector< Variable > &new_output_variables) |
| |
| void | set_input_names (const vector< string > &) |
| |
| void | set_output_names (const vector< string > &) |
| |
| void | set_input_shape (const Shape &) |
| |
| void | clear () |
| |
| void | steal_from (Network &src) |
| |
| Index | get_layers_number () const noexcept |
| |
| Index | get_layers_number (const string &) const |
| |
| Index | get_layers_number (LayerType) const |
| |
| Index | get_first_trainable_layer_index () const |
| |
| Index | get_last_trainable_layer_index () const |
| |
| Index | get_inputs_number () const |
| |
| Index | get_outputs_number () const |
| |
| Shape | get_input_shape () const |
| |
| Shape | get_output_shape () const |
| |
| ActivationFunction | get_output_activation () const |
| |
| Index | get_parameters_number () const |
| |
| void | set_parameters (const VectorR &) |
| |
| void | set_states (const VectorR &) |
| |
| void | set_parameters_random () |
| |
| void | set_parameters_glorot () |
| |
| void | set_parameters_pytorch () |
| |
| void | link_parameters () |
| |
| ParameterStorage | get_parameter_storage () const noexcept |
| |
| bool | fp32_master_released () const noexcept |
| |
| bool | low_precision_storage_ready () const noexcept |
| |
| void | link_gradients (const Buffer &) const |
| |
| void | link_gradients (span< const TensorView > layer_gradients) const |
| |
| void | link_states () |
| |
| void | link_states (Device) |
| |
| MatrixR | calculate_outputs (const vector< TensorView > &) |
| |
| void | calculate_outputs (const vector< TensorView > &, MatrixR &outputs) |
| |
| TensorView | calculate_outputs_resident (const vector< TensorView > &, ForwardPropagation &, bool upload_parameters=true) |
| |
| MatrixR | calculate_outputs (const MatrixR &) |
| |
| MatrixR | calculate_outputs (const Tensor3 &) |
| |
| MatrixR | calculate_outputs (const Tensor4 &) |
| |
| MatrixR | calculate_text_outputs (const Tensor< string, 1 > &) |
| |
| void | set_tokenizer (unique_ptr< TokenizerOperator >, const string &label="tokenizer") |
| |
| const TokenizerOperator * | get_tokenizer (const string &label="tokenizer") const |
| |
| void | set_vocabulary (const vector< string > &, const string &label="tokenizer") |
| |
| const vector< string > & | get_vocabulary (const string &label="tokenizer") const |
| |
| void | calculate_outputs (const MatrixR &, MatrixR &outputs) |
| |
| void | calculate_outputs (const Tensor3 &, MatrixR &outputs) |
| |
| void | calculate_outputs (const Tensor4 &, MatrixR &outputs) |
| |
| Tensor3 | calculate_outputs (const Tensor3 &, const Tensor3 &) |
| |
| void | calculate_outputs (const Tensor3 &, const Tensor3 &, Tensor3 &outputs) |
| |
| void | from_JSON (const JsonDocument &) |
| |
| void | to_JSON (JsonWriter &) const |
| |
| void | save (const filesystem::path &) const |
| |
| void | save_parameters_binary (const filesystem::path &) const |
| |
| void | save_states_binary (const filesystem::path &) const |
| |
| void | load (const filesystem::path &) |
| |
| void | load_parameters_binary (const filesystem::path &) |
| |
| void | load_parameters_bf16_inference_binary (const filesystem::path &) |
| |
| void | load_states_binary (const filesystem::path &) |
| |
| void | forward_propagate (const vector< TensorView > &, ForwardPropagation &, ForwardPropagationMode=ForwardPropagationMode::Inference) const |
| |
| void | forward_propagate (const vector< TensorView > &, ForwardPropagation &, ForwardPropagationMode, Index, Index) const |
| |
| void | forward_propagate (const vector< TensorView > &, const VectorR &, ForwardPropagation &) |
| |
| void | cast_parameters_to_bf16 () |
| |
| void | release_bf16_fp32_parameter_master_for_inference () |
| |
| void | upload_parameters_bf16_inference () |
| |
| void | upload_parameters_int8_inference () |
| |
| bfloat16 * | get_parameters_bf16_mirror_data () |
| |
| void | copy_parameters_device () |
| |
| void | copy_parameters_host () |
| |
| void | copy_states_device () |
| |
| void | copy_states_host () |
| |
| vector< string > | get_layer_labels () const |
| |