ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
Loading...
Searching...
No Matches
llm_bigram_bpe::comparator Struct Reference

#include <tokenizer.h>

Collaboration diagram for llm_bigram_bpe::comparator:
Collaboration graph

Public Member Functions

bool operator() (const llm_bigram_bpe &l, const llm_bigram_bpe &r) const
 

Detailed Description

Definition at line 32 of file tokenizer.h.

Member Function Documentation

◆ operator()()

bool llm_bigram_bpe::comparator::operator() ( const llm_bigram_bpe &  l,
const llm_bigram_bpe &  r 
) const
inline

Definition at line 33 of file tokenizer.h.

33 {
34 // Prioritize lower rank (higher priority in BPE merges)
35 // If ranks are equal, prioritize the one starting earlier (lower left index)
36 return l.rank > r.rank || (l.rank == r.rank && l.left > r.left);
37 }
size_t j

References j.


The documentation for this struct was generated from the following file: