Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Mastromattei committed Feb 1, 2024
1 parent 848cde7 commit 72f387d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ Both versions function identically, but we **strongly recommend** using the firs
from KEN.pretrained_model_injection.inject_all_layers import Kernel_injection

KEN_injection = Kernel_injection(trained_model, pre_trained_model, k)
optimize_model = KEN_injection.inject_all_parameters()
optimized_model = KEN_injection.inject_all_parameters()
```

Otherwise, it is possible to inject only a selected range of params, such as the attention layers:
```python
from KEN.pretrained_model_injection.inject_attention_layers import Kernel_injection

KEN_injection = Kernel_injection(trained_model, pre_trained_model, k)
optimize_model = KEN_injection.inject_attention_layers()
optimized_model = KEN_injection.inject_attention_layers()
```

## Result
Expand Down Expand Up @@ -111,7 +111,7 @@ To download the compressed model and its support dictionary, use the code below:
```python
from KEN.model_compression.compress_file import Compress_model

Cm = Compress_model(pre_trained_model, optimize_model)
Cm = Compress_model(pre_trained_model, optimized_model)
Cm.compress('./path')
```

Expand All @@ -127,7 +127,7 @@ You can easly use KENviz using the following code block:
```python
from KENviz.KEN_viz import KEN_viz

K_v = KEN_viz(pre_trained_model, optimize_model, matrix_name)
K_v = KEN_viz(pre_trained_model, optimized_model, matrix_name)
K_v.Ken_visualizer()
```
**Pro Tip**: The `matrix_name` is required for all visualizzation types. KENviz automatically handles selecting all relevant matrices in each layer based on your provided name.
Expand Down

0 comments on commit 72f387d

Please sign in to comment.