| 65 | }; |
| 66 | |
| 67 | class Sampler { |
| 68 | public: |
| 69 | IntHostTensor compute( |
| 70 | const std::vector<float> & logits, |
| 71 | const std::vector<float> & uniforms, |
| 72 | int64_t batch, |
| 73 | int64_t steps, |
| 74 | int64_t vocab_size) const; |
| 75 | }; |
| 76 | |
| 77 | class AutoregressiveSampler { |
| 78 | public: |