openvino/docs/articles_en
Anastasiia Pnevskaia 432ea63e0c
[TF FE] Fixed memory sharing for HF models. (#23318)
### Details:
 There were two problems with memory sharing, which affected HF models. 
`value()` method of class `ResourceVariable` copies value of variable in
some cases. This results in sharing of memory with a copied value, which
is deallocated when `GraphIterator` finishes its work.
Replaced `value()` with `read_value_no_copy()` which should not copy
value in any case.

Another problem is that original model inference moves weights to new
location which leads to corruption of shared memory in OV model.
So the original model should be inferred after the OV inference to
prevent any changes in original model.

### Tickets:
 - 134787, 134408

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2024-03-15 08:46:20 +00:00
..
about-openvino [DOCS] sysreq fix master (#23458) 2024-03-14 08:31:37 +00:00
documentation [DOCS] Fix face-detection-retail-0004 reference (#23417) 2024-03-12 15:31:02 +00:00
get-started [DOCS] Change install links - port to master (#23439) 2024-03-13 14:12:17 +00:00
learn-openvino [DOCS] Fix llms article format (#23422) 2024-03-12 16:54:05 +00:00
openvino-workflow [TF FE] Fixed memory sharing for HF models. (#23318) 2024-03-15 08:46:20 +00:00
about-openvino.rst [DOCS] Docs file structure update with fixes (#23343) 2024-03-11 17:05:58 +00:00
documentation.rst [DOCS] Docs file structure update with fixes (#23343) 2024-03-11 17:05:58 +00:00
get-started.rst [DOCS] postrelease adjustments port to master (#23434) 2024-03-13 12:56:55 +00:00
learn-openvino.rst [DOCS] Docs file structure update with fixes (#23343) 2024-03-11 17:05:58 +00:00
openvino-workflow.rst [DOCS] Docs file structure update with fixes (#23343) 2024-03-11 17:05:58 +00:00