0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-19 22:18:53 +02:00
construct/include/ircd/gpt/gpt.h
2021-03-09 04:50:19 -08:00

37 lines
888 B
C++

// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2021 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
#pragma once
#define HAVE_IRCD_GPT_GPT_H
/// Generative Pre-trained Transformer
///
namespace ircd::gpt
{
IRCD_EXCEPTION(ircd::error, error)
u16
generate(const vector_view<const f32> &) noexcept;
vector_view<f32>
embed(const vector_view<f32> &,
const vector_view<const u16> &) noexcept;
extern log::log log;
}
#include "vocab.h"
#include "model.h"
namespace ircd::gpt
{
using vocab::detokenize;
using vocab::tokenize;
}