Downloads · 30 days
10
33% of all-time downloads
yaser-j/gemma3-4b-ie-adapter
gemma3-4b-ie-adapter is a machine learning model from yaser-j. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
A LoRA made for the ORKG Ask information extraction usecase. It expects a list of properties and the source to extract them from
Downloads · 30 days
10
33% of all-time downloads
All-time downloads
30
Public
Repo size
157 MB
Likes
0
Public
Click a slice to open those files.
.safetensors119 MB · 75%
From the Hugging Face model README
A LoRA made for the ORKG Ask information extraction usecase. It expects a list of properties and the source to extract them from
The model also supports 13 languages and 4 diffierent language tones.
Finetuned using unsloth with a dataset created using larger LLMs like GPT-4o.
Languages supported are:
Language tones supported:
The language tones are described as follows:
Child (10–11 years old):
Teenager:
Adult:
Researcher:
The system prompt of the model is:
You will get as an input: a research paper's content and a set of properties/criteria to extract.
You will extract the values corresponding to the list of provided predicates.
You should stick to the schema and description of the properties (if available).
Use the ORKG Ask structured information extraction XML output format.
The extractions must be in the "{language}" language and the complexity of the language should be for a "{tone}".
The user prompt should look like this:
# Specifications of what to extract:
{properties}
# Extraction source:
{source}
Properties look like this:
[{'label': 'Methods', 'desc': 'The methods used in the study', 'schema': 'multiple values of type string'}, {'label': 'TL;DR', 'desc': null, 'schema': null}]
The output of the model is created in XML format
<extractions>
<extraction property="Methods">
<values>
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</value>
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</value>
</values>
<sources>
<source>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</source>
<source>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</source>
</sources>
</extraction>
<extraction property="Conclusions">
<values>
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</value>
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</value>
</values>
<sources>
<source>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</source>
<source>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</source>
</sources>
</extraction>
<extraction property="Limitations">
<values></values>
<sources></sources>
</extraction>
<extraction property="TL;DR">
<values>
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</value>
</values>
<sources></sources>
</extraction>
</extractions>
The model should be used in chat mode or use the chat template (check tokenizer) and feed it to a normal generation endpoint.
r=16
finetune_vision_layers=False, # Turn off for just text!
finetune_language_layers=True, # Should leave on!
finetune_attention_modules=True, # Attention good for GRPO
finetune_mlp_modules=True, # Should leave on always!
lora_alpha=32
lora_dropout=0
seed=42
per_device_train_batch_size=1
gradient_accumulation_steps=32
warmup_steps=5
num_train_epochs=3
learning_rate=2e-4
bf16=True
optim="adamw_torch_fused"
weight_decay=0.01
lr_scheduler_type="linear"
seed=42
Trained on responses only!!
ORKG Ask Team - [email protected]