aboutsummaryrefslogtreecommitdiff
path: root/liblangdet/model_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'liblangdet/model_internal.h')
-rw-r--r--liblangdet/model_internal.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/liblangdet/model_internal.h b/liblangdet/model_internal.h
new file mode 100644
index 0000000..73a7851
--- /dev/null
+++ b/liblangdet/model_internal.h
@@ -0,0 +1,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 */