Instructions to use fintanlabs/Fintan-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use fintanlabs/Fintan-9B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download learn/run_engine.py from fintanlabs/Fintan-9B: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/fintanlabs/Fintan-9B/resolve/main/learn/run_engine.py
- Command line
-
hf download hf://fintanlabs/Fintan-9B/learn/run_engine.py
-
curl -L -o run_engine.py https://huggingface.co/fintanlabs/Fintan-9B/resolve/main/learn/run_engine.py
1.03 kB
| """Run one step of the learning engine: python learn/run_engine.py STEP [arguments...] | |
| The engine in learn/engine/ ships compiled (machine code, one file per step); this starts a step the same way | |
| whether the engine is compiled or plain Python (for development). Each step runs in its own process, so the GPU | |
| RAM of one step is free before the next starts. | |
| """ | |
| import importlib | |
| import os | |
| import sys | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| ENGINE = os.environ.get("FINTAN_ENGINE") or os.path.join(HERE, "engine") | |
| TOP_LEVEL = {"merge_reading", "para_split"} # steps that run when loaded (no main function) | |
| def main(): | |
| if len(sys.argv) < 2: | |
| raise SystemExit(__doc__) | |
| name = sys.argv[1] | |
| sys.path.insert(0, ENGINE) | |
| sys.argv = [os.path.join(ENGINE, name + ".py")] + sys.argv[2:] | |
| mod = importlib.import_module(name) | |
| if name not in TOP_LEVEL and hasattr(mod, "main"): | |
| rc = mod.main() | |
| sys.exit(rc if isinstance(rc, int) else 0) | |
| if __name__ == "__main__": | |
| main() | |