Instructions to use QLNI/SHADOW-250M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Shadow
How to use QLNI/SHADOW-250M with Shadow:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download shadow_chat.py from QLNI/SHADOW-250M: direct link, hf CLI and curl.
- Browser
- Download file 915 Bytes
-
https://huggingface.co/QLNI/SHADOW-250M/resolve/main/shadow_chat.py
- Command line
-
hf download hf://QLNI/SHADOW-250M/shadow_chat.py
-
curl -L -o shadow_chat.py https://huggingface.co/QLNI/SHADOW-250M/resolve/main/shadow_chat.py
915 Bytes
| """Start chatting with SHADOW. Picks the right binary for your system automatically. | |
| python shadow_chat.py | |
| """ | |
| import os, sys, platform, subprocess, pathlib | |
| HERE = pathlib.Path(__file__).resolve().parent | |
| osname = platform.system() | |
| if osname == "Windows": k = HERE / "deployment" / "bin" / "windows" / "shadow.exe" | |
| elif osname == "Linux": k = HERE / "deployment" / "bin" / "linux" / "shadow" | |
| else: sys.exit("macOS build available on request: saikiranbathula1@gmail.com") | |
| if osname != "Windows": os.chmod(k, 0o755) | |
| sys.path.insert(0, str(HERE)) | |
| from shadow_runtime import Engine | |
| eng = Engine(str(HERE / "deployment" / "shadow250m_instruct.shdw"), str(HERE / "deployment" / "fp131072.npy"), kernel=str(k)) | |
| print("SHADOW 250M. Type your message, 'quit' to stop.") | |
| while True: | |
| try: q = input("you> ").strip() | |
| except EOFError: break | |
| if q in ("quit", "exit"): break | |
| if q: print("shadow>", eng.chat(q)) | |