mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	gguf.py : add token types
This commit is contained in:
		
							
								
								
									
										3
									
								
								gguf.py
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								gguf.py
									
									
									
									
									
								
							@@ -297,6 +297,9 @@ class GGUFWriter:
 | 
			
		||||
    def add_token_merges(self, merges: List):
 | 
			
		||||
        self.add_array(constants.KEY_TOKENIZER_MERGES, merges)
 | 
			
		||||
 | 
			
		||||
    def add_token_types(self, types: List[int]):
 | 
			
		||||
        self.add_array(constants.KEY_TOKENIZER_TOKEN_TYPE, types)
 | 
			
		||||
 | 
			
		||||
    def add_token_scores(self, scores: List[float]):
 | 
			
		||||
        self.add_array(constants.KEY_TOKENIZER_SCORES, scores)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user