mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-09 22:05:30 +00:00
fix-singleton
This commit is contained in:
parent
7f57769c23
commit
6f43bbe55f
4 changed files with 11 additions and 4 deletions
|
@ -360,7 +360,7 @@ class KLinearMarlin(KLinearBase):
|
|||
self.workspace = None
|
||||
|
||||
class KLinearCPUInfer(KLinearBase):
|
||||
CPU_INFER = CPUInfer(Config().cpu_infer)
|
||||
CPU_INFER = None
|
||||
def __init__(
|
||||
self,
|
||||
key: str,
|
||||
|
@ -374,6 +374,8 @@ class KLinearCPUInfer(KLinearBase):
|
|||
**kwargs,
|
||||
):
|
||||
super().__init__(key, gguf_loader, config, orig_module, device, **kwargs)
|
||||
if KLinearCPUInfer.CPU_INFER is None:
|
||||
KLinearCPUInfer.CPU_INFER = CPUInfer(Config().cpu_infer)
|
||||
self.has_bias = False
|
||||
self.dtype = torch.get_default_dtype()
|
||||
self.w = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue