mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	llama : support Llama 3 HF conversion (#6745)
* Support Llama 3 conversion The tokenizer is BPE. * style * Accept suggestion Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> * llama : add llama_token_is_eog() ggml-ci * llama : auto-detect more EOT tokens when missing in KV data * convert : replacing EOS token is a hack * llama : fix codegemma EOT token + add TODOs * llama : fix model type string for 8B model --------- Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
		| @@ -47,7 +47,7 @@ struct beam_search_callback_data { | ||||
| // In this case, end-of-beam (eob) is equivalent to end-of-sentence (eos) but this need not always be the same. | ||||
| // For example, eob can be flagged due to maximum token length, stop words, etc. | ||||
| static bool is_at_eob(const beam_search_callback_data & callback_data, const llama_token * tokens, size_t n_tokens) { | ||||
|     return n_tokens && tokens[n_tokens-1] == llama_token_eos(llama_get_model(callback_data.ctx)); | ||||
|     return n_tokens && llama_token_is_eog(llama_get_model(callback_data.ctx), tokens[n_tokens-1]); | ||||
| } | ||||
|  | ||||
| // Function matching type llama_beam_search_callback_fn_t. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Pedro Cuenca
					Pedro Cuenca