mlx-examples/llms/export/mlxlm.h

21 lines
425 B
C
Raw Normal View History

2025-01-09 08:17:45 +08:00
// Copyright © 2024 Apple Inc.
#include <mlx/mlx.h>
#include "tokenizer.h"
namespace mx = mlx::core;
std::function<mx::Args(mx::Args)> load_model(const std::string& path);
BPETokenizer load_tokenizer(const std::string& path);
struct GenerationResponse {
};
void generate(
const std::function<mx::Args(mx::Args)>& model,
const BPETokenizer& tokenizer,
const std::string& prompt,
int max_tokens = 256);