mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	Update gptneox-main.cpp
This commit is contained in:
		@@ -716,6 +716,9 @@ int main(int argc, char ** argv) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    uint32_t eos_token_id = 0;
 | 
				
			||||||
 | 
					    int keyidx = gguf_find_key(ggufctx, "tokenizer.ggml.eos_token_id"); if( keyidx != -1 ) {  eos_token_id = gguf_get_val_u32(ggufctx, keyidx); }    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int n_past = 0;
 | 
					    int n_past = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int64_t t_sample_us  = 0;
 | 
					    int64_t t_sample_us  = 0;
 | 
				
			||||||
@@ -794,7 +797,7 @@ int main(int argc, char ** argv) {
 | 
				
			|||||||
        fflush(stdout);
 | 
					        fflush(stdout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // end of text token
 | 
					        // end of text token
 | 
				
			||||||
        if (embd.back() == 0) {
 | 
					        if (embd.back() == eos_token_id) {
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user