-
Notifications
You must be signed in to change notification settings - Fork 0
model model
GitHub Action edited this page Jul 9, 2026
·
1 revision
model(class tokenizer &tokenizer, class embedder &embedder, std::vector<class block> &blocks, float learning_rate = 0.01)Tokes the tokenizer, embedder, and blocks (as well as learning rate) as parameters and re-initializes them all.
model(class tokenizer &tokenizer, std::pair<std::filesystem::path, std::vector<std::pair<std::pair<std::filesystem::path, std::vector<std::filesystem::path>>, std::filesystem::path>>> inputFiles)Reads saved model from the inputed filepaths, takes tokenizer as parameter.
A wrapper class that holds the entire model.
| Variable | Type |
|---|---|
tokenizer |
tokenizer |
embedder |
embedder |
blocks |
std::vector<block> |
learning_rate |
float |
changeLearningRate()decodeToken()forwardPass()forwardPassInternal()init()saveToFile()tokenize()train()
// Initializing a block
tokenizer tokenizer("vocab.txt");
embedder embedder("bestembedderever.bin");
std::vector<block> blocks = {{{128, 512, 128}, 128}};
model m(tokenizer, embedder, blocks);- AIUsage
- Block
- Embedder
- Introduction
- Layer
- Model
- NeuralNetwork
- PositionalEncoding
- SelfAttention
- Tokenizer
- Utility