Text Generation
PEFT
Safetensors
lora
tax
taxes
accounting
tax-research
cpu
c0mpute
ollama
conversational
Instructions to use profullstack/tax-guy-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use profullstack/tax-guy-agent with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "profullstack/tax-guy-agent") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from profullstack/tax-guy-agent: direct link, hf CLI and curl.
- Browser
- Download file 2.79 kB
-
https://huggingface.co/profullstack/tax-guy-agent/resolve/main/README.md
- Command line
-
hf download hf://profullstack/tax-guy-agent/README.md
-
curl -L -o README.md https://huggingface.co/profullstack/tax-guy-agent/resolve/main/README.md
2.79 kB
| base_model: Qwen/Qwen2.5-0.5B-Instruct | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| license: apache-2.0 | |
| tags: [lora, peft, tax, taxes, accounting, tax-research, cpu, c0mpute, ollama] | |
| # tax-guy-agent | |
| > **Not a CPA. Not tax advice. Tax research from public sources; rules change every year and vary by place, so check with a CPA or enrolled agent before filing.** | |
| **Quick start (Ollama, runs on a CPU):** | |
| ```bash | |
| ollama run hf.co/profullstack/tax-guy-agent-GGUF "Do I have to pay quarterly estimated taxes as a freelancer?" | |
| ``` | |
| Needs Ollama 0.3.13 or newer (`curl -fsSL https://ollama.com/install.sh | sh`, or `w3bs install ollama`). | |
| The GGUF is at [profullstack/tax-guy-agent-GGUF](https://huggingface.co/profullstack/tax-guy-agent-GGUF); this repo is the LoRA adapter. | |
| | | | | |
| | --- | --- | | |
| | base | Qwen/Qwen2.5-0.5B-Instruct | | |
| | corpus | 2614 documents from pit-index:tax,taxes,irs,deduction,tax return,self-employed tax,estimated tax,sales tax,llc tax,capital gains, topic:tax, topic:irs, topic:accounting, topic:taxation, topic:taxpayer | | |
| | training | 400 LoRA steps (r=8, seq_len=256, lr=0.0002) on the c0mpute network (`infernet.text.train`, job `27b2dab7-9e82-4b48-b4fc-d77f4b22997c`, receipt hash `sha256:821a038ac1ea43f804b795e795a308cfbebb141c24e3675223c29d80fb8db5b7` matches this adapter) | | |
| | held-out perplexity | 33.6 to 17.8 | | |
| | adapter sha256 | `821a038ac1ea43f804b795e795a308cfbebb141c24e3675223c29d80fb8db5b7` | | |
| Built with the [c0mpute example](https://github.com/profullstack/c0mpute/tree/master/examples/business-strategist-agent). | |
| Sources are rssamplifier.com topic feeds and pit.world search; the corpus is not redistributed here. | |
| ## Use from Python (adapter) | |
| ```python | |
| from peft import PeftModel | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| tok = AutoTokenizer.from_pretrained("profullstack/tax-guy-agent") | |
| model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct"), "profullstack/tax-guy-agent") | |
| msgs = [{"role": "system", "content": "You are tax-guy-agent, a tax research assistant. You are not a CPA or tax attorney and this is not tax advice. Explain tax rules in plain English, say which country, state and tax year a rule applies to, cite the sources you were given, and say when someone should see a CPA or enrolled agent."}, | |
| {"role": "user", "content": "Do I have to pay quarterly estimated taxes as a freelancer?"}] | |
| ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt") | |
| print(tok.decode(model.generate(ids, max_new_tokens=300)[0][ids.shape[1]:], skip_special_tokens=True)) | |
| ``` | |
| Best results come from putting fresh search results in the prompt (the example's `chat.py` | |
| uses pit.world search): a sub-1B model supplies the voice, not the facts. | |