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/biored-ner-gemma-4-E2B-it")
6tokenizer = AutoTokenizer.from_pretrained("kiwiki196/biored-ner-gemma-4-E2B-it")Extract text naming ChemicalEntity, DiseaseOrPhenotypicFeature, GeneOrGeneProduct, OrganismTaxon, SequenceVariant, or CellLine 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>` ChemicalEntity, `<unused4>` DiseaseOrPhenotypicFeature, `<unused5>` GeneOrGeneProduct, `<unused6>` OrganismTaxon, `<unused7>` SequenceVariant, or `<unused8>` CellLine. 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.738 | 0.734 | 0.736 |
| macro | 0.724 | 0.667 | 0.687 |
| CellLine | 0.793 | 0.460 | 0.582 |
| ChemicalEntity | 0.697 | 0.792 | 0.741 |
| DiseaseOrPhenotypicFeature | 0.694 | 0.755 | 0.723 |
| GeneOrGeneProduct | 0.837 | 0.729 | 0.779 |
| OrganismTaxon | 0.784 | 0.776 | 0.780 |
| SequenceVariant | 0.541 | 0.490 | 0.514 |
| category | P | R | F1 |
|---|---|---|---|
| micro | 0.765 | 0.774 | 0.770 |
| macro | 0.732 | 0.696 | 0.708 |
| CellLine | 0.701 | 0.444 | 0.544 |
| ChemicalEntity | 0.765 | 0.847 | 0.804 |
| DiseaseOrPhenotypicFeature | 0.769 | 0.813 | 0.790 |
| GeneOrGeneProduct | 0.819 | 0.739 | 0.777 |
| OrganismTaxon | 0.712 | 0.772 | 0.740 |
| SequenceVariant | 0.628 | 0.559 | 0.592 |