Skip to content

Commit

Permalink
fix: smaller batch for llama in FHE
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-stoian-zama committed Jan 5, 2025
1 parent a4a248e commit 6f6cfb9
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 1,955 deletions.
3 changes: 1 addition & 2 deletions src/concrete/ml/torch/hybrid_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from brevitas.quant_tensor import QuantTensor
from concrete.fhe import Configuration
from torch import nn
from tqdm.autonotebook import tqdm

from ..common.utils import MAX_BITWIDTH_BACKWARD_COMPATIBLE, HybridFHEMode
from ..deployment.fhe_client_server import FHEModelClient, FHEModelDev, FHEModelServer
Expand Down Expand Up @@ -577,8 +578,6 @@ def compile_model(

self.configuration = configuration

from tqdm import tqdm

for name in tqdm(self.module_names, desc="Compiling FHE layers"):
remote_module = self._get_module_by_name(self.model, name)
assert isinstance(remote_module, RemoteModule)
Expand Down
2 changes: 1 addition & 1 deletion src/concrete/ml/torch/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import torch
from torch import Tensor, nn
from torch.utils.data import DataLoader
from tqdm import tqdm
from tqdm.autonotebook import tqdm

from ..common.utils import assert_true
from .hybrid_backprop_linear import CustomLinear
Expand Down
Loading

0 comments on commit 6f6cfb9

Please sign in to comment.