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_runtime/__main__.py from QLNI/SHADOW-250M: direct link, hf CLI and curl.
- Browser
- Download file 531 Bytes
-
https://huggingface.co/QLNI/SHADOW-250M/resolve/main/shadow_runtime/__main__.py
- Command line
-
hf download hf://QLNI/SHADOW-250M/shadow_runtime/__main__.py
-
curl -L -o __main__.py https://huggingface.co/QLNI/SHADOW-250M/resolve/main/shadow_runtime/__main__.py
531 Bytes
| import argparse, sys | |
| from . import Engine | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--model", required=True); ap.add_argument("--table", required=True) | |
| ap.add_argument("--archive"); ap.add_argument("--ask"); ap.add_argument("--chat", action="store_true") | |
| a = ap.parse_args() | |
| eng = Engine(a.model, a.table, archive=a.archive) | |
| if a.ask: print(eng.answer(a.ask)) | |
| elif a.chat: | |
| while True: | |
| try: q = input("you> ") | |
| except EOFError: break | |
| if not q.strip(): continue | |
| print("shadow>", eng.chat(q)) | |