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/lm_eval/tasks/code_x_glue/code-text/utils.py from BayesTensor/out: direct link, hf CLI and curl.
- Browser
- Download file 308 Bytes
-
https://huggingface.co/BayesTensor/out/resolve/main/lm-evaluation-harness/lm_eval/tasks/code_x_glue/code-text/utils.py
- Command line
-
hf download hf://BayesTensor/out/lm-evaluation-harness/lm_eval/tasks/code_x_glue/code-text/utils.py
-
curl -L -o utils.py https://huggingface.co/BayesTensor/out/resolve/main/lm-evaluation-harness/lm_eval/tasks/code_x_glue/code-text/utils.py
308 Bytes
| def doc_to_text(doc): | |
| inputs = " ".join(doc["code_tokens"]).replace("\n", " ") | |
| inputs = " ".join(inputs.strip().split()) | |
| return inputs | |
| def doc_to_target(doc): | |
| targets = " ".join(doc["docstring_tokens"]).replace("\n", "") | |
| targets = " ".join(targets.strip().split()) | |
| return targets | |