fix phi3 (#11022)
This commit is contained in:
		
							parent
							
								
									7d3791c819
								
							
						
					
					
						commit
						ee325e9cc9
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		| 
						 | 
					@ -1533,8 +1533,6 @@ def _optimize_post(model, lightweight_bmm=False):
 | 
				
			||||||
            model,
 | 
					            model,
 | 
				
			||||||
            module.Phi3RMSNorm,
 | 
					            module.Phi3RMSNorm,
 | 
				
			||||||
            phi3_rms_norm_forward)
 | 
					            phi3_rms_norm_forward)
 | 
				
			||||||
        # Empty cache after the first attention to run long context.
 | 
					 | 
				
			||||||
        model.model.layers[0].self_attn.register_forward_hook(empty_cache_post)
 | 
					 | 
				
			||||||
    elif model.config.model_type == 'yuan':
 | 
					    elif model.config.model_type == 'yuan':
 | 
				
			||||||
        modeling_module_name = model.__class__.__module__
 | 
					        modeling_module_name = model.__class__.__module__
 | 
				
			||||||
        module = importlib.import_module(modeling_module_name)
 | 
					        module = importlib.import_module(modeling_module_name)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue