Instructions to use BayesTensor/out with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use BayesTensor/out with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "BayesTensor/out") - Notebooks
- Google Colab
- Kaggle
Download lm-evaluation-harness/tests/test_cli.py from BayesTensor/out: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/BayesTensor/out/resolve/main/lm-evaluation-harness/tests/test_cli.py
- Command line
-
hf download hf://BayesTensor/out/lm-evaluation-harness/tests/test_cli.py
-
curl -L -o test_cli.py https://huggingface.co/BayesTensor/out/resolve/main/lm-evaluation-harness/tests/test_cli.py
1.25 kB
| import argparse | |
| import pytest | |
| import lm_eval.__main__ | |
| def test_cli_parse_error(): | |
| """ | |
| Assert error raised if cli args argument doesn't have type | |
| """ | |
| with pytest.raises(ValueError): | |
| parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter) | |
| parser.add_argument( | |
| "--model", "-m", type=str, default="hf", help="Name of model e.g. `hf`" | |
| ) | |
| parser.add_argument( | |
| "--tasks", | |
| "-t", | |
| default=None, | |
| metavar="task1,task2", | |
| help="To get full list of tasks, use the command lm-eval --tasks list", | |
| ) | |
| lm_eval.__main__.check_argument_types(parser) | |
| def test_cli_parse_no_error(): | |
| """ | |
| Assert typed arguments are parsed correctly | |
| """ | |
| parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter) | |
| parser.add_argument( | |
| "--model", "-m", type=str, default="hf", help="Name of model e.g. `hf`" | |
| ) | |
| parser.add_argument( | |
| "--tasks", | |
| "-t", | |
| type=str, | |
| default=None, | |
| metavar="task1,task2", | |
| help="To get full list of tasks, use the command lm-eval --tasks list", | |
| ) | |
| lm_eval.__main__.check_argument_types(parser) | |