Update src/llama-vocab.cpp
This commit is contained in:
parent
7c2b924232
commit
723fc66511
1 changed files with 3 additions and 3 deletions
|
@ -1245,13 +1245,13 @@ struct llama_vocab::impl {
|
|||
|
||||
std::vector<llama_token> cache_special_tokens;
|
||||
std::vector<std::string> cache_token_to_piece; // llama_token_to_piece(special = true);
|
||||
struct PairHash {
|
||||
size_t operator()(const std::pair<std::string, std::string>& p) const {
|
||||
struct pair_hash {
|
||||
size_t operator()(const std::pair<std::string, std::string> & p) const {
|
||||
return std::hash<std::string>{}(p.first) ^ //create some hash for pair
|
||||
(std::hash<std::string>{}(p.second) << 1);
|
||||
}
|
||||
};
|
||||
std::unordered_map<std::pair<std::string, std::string>, int, PairHash> bpe_ranks;
|
||||
std::unordered_map<std::pair<std::string, std::string>, int, pair_hash> bpe_ranks;
|
||||
|
||||
// set of all tokens that cause "end of generation"
|
||||
std::set<llama_token> special_eog_ids;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue