pulsatrix 1.1.0
Loading...
Searching...
No Matches
born_again.hpp
Go to the documentation of this file.
1
25#pragma once
26
27#include <cstdint>
28#include <vector>
29
30#include "pulsatrix/tensor.hpp"
31
32namespace pulsatrix {
33
40[[nodiscard]] Tensor EnsembleLogProbabilities(const std::vector<Tensor>& logits, DeviceBackend* backend);
41
48[[nodiscard]] Tensor PermuteDarkKnowledge(const Tensor& teacher_logits, uint64_t seed, DeviceBackend* backend);
49
50} // namespace pulsatrix
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:248
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Definition acquisition_functions.hpp:16
Tensor PermuteDarkKnowledge(const Tensor &teacher_logits, uint64_t seed, DeviceBackend *backend)
The teacher's logits with each row's non-maximal entries shuffled among themselves by a portable gene...
Tensor EnsembleLogProbabilities(const std::vector< Tensor > &logits, DeviceBackend *backend)
log((1/G) Σ_g softmax(logits_g)) row by row, (..., classes), on the first tensor's device.
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).