build: enforce C++17 and add gpt example
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include "cenet/network.hpp"
|
||||
#include "tokenizer.hpp"
|
||||
|
||||
#include <cenet/cenet.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
static constexpr std::size_t VOCAB_SIZE = 2256;
|
||||
|
||||
using network_type = cenet::network<std::vector<std::uint32_t>, cenet::tok2vec_layer<2256, 512>>;
|
||||
|
||||
int main(void) {
|
||||
tokenizer<VOCAB_SIZE> bpe;
|
||||
if (!bpe.load("./gpt/shakespeare.bpe")) return 1;
|
||||
std::cout << "Vocabulary loaded!\n";
|
||||
|
||||
auto* gpt = new network_type();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user