remove unused import gptneox_cpp (#8293)
This commit is contained in:
		
							parent
							
								
									aa91657019
								
							
						
					
					
						commit
						1571ba6425
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -22,7 +22,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from typing import Optional, Union, Sequence, List
 | 
					from typing import Optional, Union, Sequence, List
 | 
				
			||||||
from bigdl.llm.utils.common import invalidInputError
 | 
					from bigdl.llm.utils.common import invalidInputError
 | 
				
			||||||
from bigdl.llm.ggml.model.gptneox import gptneox_cpp
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class GenerationMixin:
 | 
					class GenerationMixin:
 | 
				
			||||||
| 
						 | 
					@ -57,7 +56,7 @@ class GenerationMixin:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def generate(
 | 
					    def generate(
 | 
				
			||||||
        self,
 | 
					        self,
 | 
				
			||||||
        inputs: Union[Optional[Sequence[int]], Sequence[gptneox_cpp.gptneox_token]]=None,
 | 
					        inputs: Optional[Sequence[int]]=None,
 | 
				
			||||||
        max_new_tokens: int = 128,
 | 
					        max_new_tokens: int = 128,
 | 
				
			||||||
        top_k: int = 40,
 | 
					        top_k: int = 40,
 | 
				
			||||||
        top_p: float = 0.95,
 | 
					        top_p: float = 0.95,
 | 
				
			||||||
| 
						 | 
					@ -72,7 +71,7 @@ class GenerationMixin:
 | 
				
			||||||
        mirostat_eta: float = 0.1,
 | 
					        mirostat_eta: float = 0.1,
 | 
				
			||||||
        stop: Optional[Union[str, List[str]]]=[],  # TODO: rebase to support stopping_criteria
 | 
					        stop: Optional[Union[str, List[str]]]=[],  # TODO: rebase to support stopping_criteria
 | 
				
			||||||
        **kwargs,
 | 
					        **kwargs,
 | 
				
			||||||
    ) -> Union[Optional[Sequence[int]], Optional[Sequence[gptneox_cpp.gptneox_token]], None]:
 | 
					    ) -> Union[Optional[Sequence[int]], None]:
 | 
				
			||||||
        # TODO: modify docs
 | 
					        # TODO: modify docs
 | 
				
			||||||
        """Create a generator of tokens from a prompt.
 | 
					        """Create a generator of tokens from a prompt.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue