# Better way to save Lux model and parameters

**URL:** https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506
**Category:** General Usage
**Tags:** flux
**Created:** [October 10, 2022, 5:07am UTC](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506 "2022-10-10T05:07:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Molox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/molox/32/35002_2.png) [@Molox](https://discourse.julialang.org/u/Molox)
#### Post date: [October 10, 2022, 5:07am UTC](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506/1 "2022-10-10T05:07:47Z")

</div>

I was using Flux and BSON to save the model.

Now I am switching to Lux now and I know the model, parameters, and states are separated.

The parameters are Component Arrays and I am not sure how to save them properly.

(I have an issue with [loading BSON](https://github.com/JuliaIO/BSON.jl/issues/109) file using Julia v1.8)

But here I mainly would like to know **any alternative ways** to save model parameters. Thank you!!

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [October 10, 2022, 5:38am UTC](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506/2 "2022-10-10T05:38:45Z")

</div>

> [@Molox](#):
>
> **any alternative ways**

[Serialization · The Julia Language](https://docs.julialang.org/en/v1/stdlib/Serialization/) will always work (be careful though…)

---

<div class="post-metadata">

### Author: ![Molox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/molox/32/35002_2.png) [@Molox](https://discourse.julialang.org/u/Molox)
#### Post date: [October 10, 2022, 5:44am UTC](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506/3 "2022-10-10T05:44:04Z")

</div>

Thank you I will check that
