hharsha commited on
Commit
29a3108
·
verified ·
1 Parent(s): 0be48af

Fix usage for transformers without text2text-generation pipeline task

Browse files
Files changed (1) hide show
  1. README.md +34 -12
README.md CHANGED
@@ -25,24 +25,39 @@ widget:
25
 
26
  Lightweight **text2text tag generator** for agentic AI / RAG / LLMOps GitHub-style
27
  descriptions. Fine-tuned from [`google-t5/t5-small`](https://huggingface.co/google-t5/t5-small)
28
- with **PEFT LoRA** (r=16, alpha=32, dropout=0.05, target_modules q/v) on
29
  [`hharsha/agentic-github-meta`](https://huggingface.co/datasets/hharsha/agentic-github-meta),
30
- then **merged** so `transformers` pipelines work on free CPU.
31
 
32
- > ~60M-param T5-small tagger — **not** a 7B chat demo.
33
 
34
  ## Usage
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ```python
37
  from transformers import pipeline
38
  pipe = pipeline("text2text-generation", model="hharsha/agentic-github-tagger")
39
  print(pipe("multi-agent platform with RAG, MCP, and observability")[0]["generated_text"])
40
  ```
41
 
42
- Sample:
43
 
44
  ```
45
- Multi-agents, multi-agent, observability, observability, observability, rag, mCP, observability, multiagents, multi-agents, observability, observability, observability, observability,
46
  ```
47
 
48
  ## Training
@@ -50,14 +65,21 @@ Multi-agents, multi-agent, observability, observability, observability, rag, mCP
50
  | | |
51
  |---|---|
52
  | Base | `google-t5/t5-small` |
53
- | LoRA | r=16, alpha=32, dropout=0.05, modules q/v |
 
 
54
  | Epochs | 3 (CPU) |
55
- | Batch | 8 |
56
- | Dataset | [`hharsha/agentic-github-meta`](https://huggingface.co/datasets/hharsha/agentic-github-meta) |
57
 
58
  ## Links
59
 
60
- - Dataset: https://huggingface.co/datasets/hharsha/agentic-github-meta
61
- - Showcase: https://huggingface.co/datasets/hharsha/agentic-systems-showcase
62
- - Studio: https://agentic-systems-studio.com
63
- - GitHub: https://github.com/hharsha98
 
 
 
 
 
 
25
 
26
  Lightweight **text2text tag generator** for agentic AI / RAG / LLMOps GitHub-style
27
  descriptions. Fine-tuned from [`google-t5/t5-small`](https://huggingface.co/google-t5/t5-small)
28
+ with **PEFT LoRA** (r=16, alpha=32, dropout=0.05, target_modules `q`,`v`) on
29
  [`hharsha/agentic-github-meta`](https://huggingface.co/datasets/hharsha/agentic-github-meta),
30
+ then **merged** so full small weights load on free CPU.
31
 
32
+ > ~60M-param T5-small tagger — **not** a 7B chat demo. Free Hub + CPU friendly.
33
 
34
  ## Usage
35
 
36
+ ```python
37
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
38
+
39
+ model_id = "hharsha/agentic-github-tagger"
40
+ tok = AutoTokenizer.from_pretrained(model_id)
41
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
42
+
43
+ text = "multi-agent platform with RAG, MCP, and observability"
44
+ ids = tok(text, return_tensors="pt")
45
+ out = model.generate(**ids, max_new_tokens=64, num_beams=4)
46
+ print(tok.decode(out[0], skip_special_tokens=True))
47
+ ```
48
+
49
+ On older `transformers` that still register the task, this also works:
50
+
51
  ```python
52
  from transformers import pipeline
53
  pipe = pipeline("text2text-generation", model="hharsha/agentic-github-tagger")
54
  print(pipe("multi-agent platform with RAG, MCP, and observability")[0]["generated_text"])
55
  ```
56
 
57
+ Sample output from this training run:
58
 
59
  ```
60
+ multi-agent, multi-agent, observability, rag, mCP, observability
61
  ```
62
 
63
  ## Training
 
65
  | | |
66
  |---|---|
67
  | Base | `google-t5/t5-small` |
68
+ | Method | PEFT LoRA then merge |
69
+ | r / alpha / dropout | 16 / 32 / 0.05 |
70
+ | target_modules | q, v |
71
  | Epochs | 3 (CPU) |
72
+ | Batch size | 8 |
73
+ | Dataset | [`hharsha/agentic-github-meta`](https://huggingface.co/datasets/hharsha/agentic-github-meta) (687 rows; 600 used for train) |
74
 
75
  ## Links
76
 
77
+ - Dataset: [`hharsha/agentic-github-meta`](https://huggingface.co/datasets/hharsha/agentic-github-meta)
78
+ - Showcase: [`hharsha/agentic-systems-showcase`](https://huggingface.co/datasets/hharsha/agentic-systems-showcase)
79
+ - Studio: [https://agentic-systems-studio.com](https://agentic-systems-studio.com)
80
+ - GitHub: [https://github.com/hharsha98](https://github.com/hharsha98)
81
+
82
+ ## Intended use / limits
83
+
84
+ Auto-suggest comma-separated tags for agentic / RAG / LLMOps project listings.
85
+ Small model; tags can repeat or be incomplete. Not for safety-critical labeling.