Skip to content

Commit

Permalink
Added method headers and fields for text completion trainer and text …
Browse files Browse the repository at this point in the history
…completion training implementation file
  • Loading branch information
FuexFollets committed Feb 8, 2024
1 parent 4644e93 commit a363df3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Empty file.
20 changes: 15 additions & 5 deletions src/lexocraft/llm/text_completion_training.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,31 @@
#define LEXOCRAFT_TEXT_COMPLETION_TRAINING_HPP

#include <optional>
#include <string>

#include <lexocraft/llm/text_completion.hpp>
#include <lexocraft/neural_network/neural_network.hpp>

namespace lc {
class TextCompletionTraining {
class TextCompletionTrainer {
public:

enum class Modifier {
EphemeralMemory = 0b0001,
ContextBuilder = 0b0010,
word_vector_improviser = 0b0100,
struct TrainingModification {
std::optional<NeuralNetwork::NeuralNetworkDiff> ephemeral_memory_diff;
std::optional<NeuralNetwork::NeuralNetworkDiff> context_builder_diff;
std::optional<NeuralNetwork::NeuralNetworkDiff> word_vector_improviser_diff;

float original_cost {};
float improved_cost {};
};

std::optional<TextCompleter> text_completer;

TrainingModification
train_neural_network(const std::vector<std::string>& training_data_sections);
TrainingModification train_neural_network(const std::string& training_data);

TextCompleter& apply_training_modification(const TrainingModification& modification);
};
} // namespace lc

Expand Down

0 comments on commit a363df3

Please sign in to comment.