Views
No views yet
google/gemma-4-E2B-it. Gemma 4 is gated -- request access on its model page before loading this adapter.1from transformers import AutoModelForMultimodalLM, AutoTokenizer
2from peft import PeftModel
3
4base = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-E2B-it", device_map="auto")
5model = PeftModel.from_pretrained(base, "kiwiki196/bc5cdr-ner-gemma-4-E2B-it")
6tokenizer = AutoTokenizer.from_pretrained("kiwiki196/bc5cdr-ner-gemma-4-E2B-it")Extract text naming Chemical or Disease from the input. The text has positional markers already embedded (`<unused0>N<unused1>`, e.g. `<unused0>58<unused1>`) — each marker's id is arbitrary, not a reading-order count, so markers do not necessarily appear in ascending numeric order. These markers are not part of the content; never extract one as a match.
Copy each match verbatim from the input, including any irregular internal whitespace or embedded line breaks. Include negated, uncertain, and hedged mentions, but not the negation/hedging words themselves. Do not include anything outside the categories above.
Before every match, write the id of the nearest `<unused0>N<unused1>` marker before it, followed by `<unused2>` — repeat this prefix before EVERY match, even consecutive matches under the same marker; never omit or dedupe it — then the match text, then its `<CATEGORY_TOKEN>`, as `N<unused2>TEXT<CATEGORY_TOKEN>` (text first, category token last — not the other way around, and no other characters — never write markup like `<span>`). `<CATEGORY_TOKEN>` is one of: `<unused3>` Chemical or `<unused4>` Disease. Tag every occurrence separately, even repeats of the same text — do not deduplicate. Output only this, with no explanation or markdown fences.| category | P | R | F1 |
|---|---|---|---|
| micro | 0.692 | 0.733 | 0.712 |
| macro | 0.688 | 0.728 | 0.707 |
| Chemical | 0.723 | 0.779 | 0.750 |
| Disease | 0.652 | 0.677 | 0.664 |
| category | P | R | F1 |
|---|---|---|---|
| micro | 0.728 | 0.771 | 0.749 |
| macro | 0.728 | 0.775 | 0.750 |
| Chemical | 0.739 | 0.824 | 0.779 |
| Disease | 0.717 | 0.726 | 0.721 |