mirror of
				https://github.com/ml-explore/mlx-examples.git
				synced 2025-10-31 19:18:09 +08:00 
			
		
		
		
	Rope theta to support Coda Llama (#121)
* rope theta for llama model * llama chat/code * nit
This commit is contained in:
		| @@ -206,7 +206,10 @@ if __name__ == "__main__": | ||||
|  | ||||
|         if (len(tokens) % 10) == 0: | ||||
|             mx.eval(tokens) | ||||
|             eos_index = next((i for i, t in enumerate(tokens) if t.item() == tokenizer.eos_token_id), None) | ||||
|             eos_index = next( | ||||
|                 (i for i, t in enumerate(tokens) if t.item() == tokenizer.eos_token_id), | ||||
|                 None, | ||||
|             ) | ||||
|  | ||||
|             if eos_index is not None: | ||||
|                 tokens = tokens[:eos_index] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Awni Hannun
					Awni Hannun