Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/augustunderground/prehsept
Modeling the behaviour of primitive devices with Hasktorch.
https://github.com/augustunderground/prehsept
gm-over-id haskell hasktorch machine-learning transistor-characterization
Last synced: about 5 hours ago
JSON representation
Modeling the behaviour of primitive devices with Hasktorch.
- Host: GitHub
- URL: https://github.com/augustunderground/prehsept
- Owner: AugustUnderground
- License: bsd-3-clause
- Created: 2021-08-08T12:45:29.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-23T09:09:50.000Z (about 1 year ago)
- Last Synced: 2023-08-23T11:49:58.082Z (about 1 year ago)
- Topics: gm-over-id, haskell, hasktorch, machine-learning, transistor-characterization
- Language: Jupyter Notebook
- Homepage: https://augustunderground.github.io/prehsept/
- Size: 430 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# prehsept
Modeling the behaviour of primitive devices around the operating point in
haskell.## Setup
Requires [libtorch](https://pytorch.org/get-started/locally/) symlinked into
the root of this repository according to `extra-include-dirs` and
`extra-lib-dirs` in `stack.yaml`.The `setenv` script can be sourced to export the correct `LD_LIBRARY_PATH`.
Additionally it exports the `DEVICE` variable, supposedly enabling GPU support
in Hasktorch (I'm not sure how/if it works).```sh
$ source setenv
```## Usage
Build the project with stack
```sh
$ stack build
```then run it
```sh
$ stack run
```### CLI
The executable part supports the following arguments:
```bash
Primitive Device Modeling Around the Operating PointUsage: prehsept-exe [-k|--pdk PDK] [-d|--dev DEV] (-p|--dir DIR) [-n|--num NUM]
[-r|--reg REGION] [-s|--size SIZE]
PREHSEPTAvailable options:
-k,--pdk PDK PDK from which the data was generated
(default: xh035)
-d,--dev DEV Device Type: nmos | pmos (default: nmos)
-p,--dir DIR Path to lookup-table as tensor
-n,--num NUM Number of Epochs (default: 25)
-r,--reg REGION Region of Operation: 2 | 3 (default: 2)
-e,--exp Experimental Mapping
-s,--size SIZE Batch Size (default: 5000)
-h,--help Show this help text
```For example, to train a GPDK180 NMOS model for 100 epochs with a batch size of
32 run:```bash
stack exec -- prehsept-exe --pdk gpdk180 --dev nmos --dir ./data/gpdk180-pmos.pt --size 32 --num 100
```## Notebooks
The notebooks can be viewed locally by running the jupyter server in the
`./notebooks` directory:```bash
$ stack exec jupyter -- notebook
```[IHaskell](https://github.com/IHaskell/IHaskell) must be installed for this to
work.## License
BSD3
## Thanks
Thanks to the [hastorch](https://github.com/hasktorch/hasktorch) project!