blob: 73a78518f8c39ae418b3ee68f0a86becb9e59ccd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#ifndef LANGDET_MODEL_INTERNAL_H
#define LANGDET_MODEL_INTERNAL_H
#include "model_types.h"
#include "alloc.h"
/* Validate F32 dtype, exact dimensions, byte count, and mapped-file bounds. */
int tensor_has_supported_shape(const safetensors_file_t *sf,
const safetensor_t *t,
const char *name,
const int64_t *shape,
int ndim);
int ensure_buffers(langdet_workspace_t *ws, const langdet_config_t *cfg, int seq);
void ensure_attention_scores(langdet_workspace_t *ws, const int *offsets, int batch);
#endif /* LANGDET_MODEL_INTERNAL_H */
|