Save model weights in quantized fixed point representation instead of floating point
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
The issue concerns the Vivado writer, which emits model weights into the C++ header files of the HLS project. Start by finding where that writer serializes weight values and where the configured fixed precision is applied. Done means the generated weights are written as quantized fixed-point or integer values rather than floats, and csim results still match. The representation (decimal or integer) is not settled in the thread, so confirm it with maintainers before coding.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Details
Currently, hls4ml writes model weights to C++ header files included in the compiled HLS project. These weights are stored in floating point representation. Without delving into the source code it's difficult to tell but the weights appear to be rounded to a number of decimal places equal to the word length of the PTQ fixed precisions selected in hls4ml (see below).
We can run a csim to save the "true" quantized model parameters (see below, upper right). In our work with NI FPGA hardware (programmed via LabVIEW), we experienced issues where LabVIEW coerces the floating point weights (see below, left) to different fixed-point decimal representations (see below, bottom right) than Vivado HLS. Loading these LabVIEW parsed weights, we observe incorrect model outputs in comparison to csim. However, loading the quantized fixed-point weights produced by Vivado HLS instead yields correct predictions.
New behavior
It may be beneficial for future external weight functionality and those looking to view the "true" quantized weights associated with their model to save the model weights in their quantized decimal or integer representation instead of floating point.
Motivation
As hls4ml expands in reach and functionality, compatibility issues like these between Vivado HLS and other platforms such as LabVIEW may arise. Writing the true quantized weights may curb many potential issues.
Parts of hls4ml being affected
Vivado writer.
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 605
- Merge medio
- 6g 16h
- PR unite (30g)
- 20
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fastmachinelearning/hls4ml
-
vitis:fifo_depth_optimization fails for models with more than one input or outputForse già presa @dgaytanv l’ha presa 2 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fastmachinelearning/hls4ml#1582 ·
I maintainer di solito rispondono entro 3 giorni
-
bug Stale
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
fastmachinelearning/hls4ml#771 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
error while converting onnx model to hlsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug Stale
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
fastmachinelearning/hls4ml#686 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
fastmachinelearning/hls4ml#630 ·
I maintainer di solito rispondono entro 3 giorni
-
Stale
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
fastmachinelearning/hls4ml#297 · 4 commenti ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di fastmachinelearning/hls4ml
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
lidofinance/diffyscan#239 ·
I maintainer di solito rispondono entro 1 giorno
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsApertaarea: tools documentation good first issue ready for a contributor
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
eyalgolan/statecraft-israel#873 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
GET rooms API returns 500 due to nonexistent Room.is_active attributeForse già presa @Mars-60 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Add cover art to song rowsApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 5 giorni
-
Harmony OPeNDAP SubSetter (HOSS) Geographic production rssmif16d 7 XYZ_PROV
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nasa/harmony-autotester#341 ·