Instructions to use AdrienGuille/GemmAMR-fr-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdrienGuille/GemmAMR-fr-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AdrienGuille/GemmAMR-fr-v1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("AdrienGuille/GemmAMR-fr-v1") model = AutoModelForMultimodalLM.from_pretrained("AdrienGuille/GemmAMR-fr-v1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AdrienGuille/GemmAMR-fr-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdrienGuille/GemmAMR-fr-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdrienGuille/GemmAMR-fr-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/AdrienGuille/GemmAMR-fr-v1
- SGLang
How to use AdrienGuille/GemmAMR-fr-v1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AdrienGuille/GemmAMR-fr-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdrienGuille/GemmAMR-fr-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AdrienGuille/GemmAMR-fr-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdrienGuille/GemmAMR-fr-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use AdrienGuille/GemmAMR-fr-v1 with Docker Model Runner:
docker model run hf.co/AdrienGuille/GemmAMR-fr-v1
Model Card for Model ID
GemmAMR-fr-v1 is an AMR semantic parser for the French language.
Model Details
Model Description
- Developed by: Laboratoire ERIC
- Funded by: ANR-25-CE45-0054 IMAGE-TEXTE-AVC
- Languages: input: French, English; output: AMR
- Finetuned from model: google/translategemma-4b-it
Model Sources
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
# load model
tokenizer = AutoTokenizer.from_pretrained("adrienguille/gemmamr-fr-v1")
model = AutoModelForCausalLM.from_pretrained(
"adrienguille/gemmamr-fr-v1",
dtype="auto",
device_map="auto",
trust_remote_code=True
)
# preprocess input
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"source_lang_code": "fr",
"text": "Un caillot a obstrué une artère cérébrale." # <-- input a sentence here
}
],
}
]
formatted_input = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
# generate AMR
inputs = tokenizer(
[formatted_input],
max_length=512,
padding=True,
truncation=True,
return_tensors="pt"
).to("cuda")
output_ids = model.generate(
inputs["input_ids"],
attention_mask=inputs["attention_mask"],
max_length=512
)
decoded_amr = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0].split("\nmodel\n")[-1]
print(decoded_amr)
Citation
Thomas Checchin, Julien Jacques, Adrien Guille. Un décodeur pour l'analyse sémantique AMR en français. Actes des 33ème Conférence sur le Traitement Automatique des Langues Naturelles (TALN 2026)
BibTeX:
@inproceedings{Checchin-Jacques-Guille:CORIA-TALN:2026, author = "Checchin, Thomas and Jacques, Julien and Guille, Adrien", title = "Un décodeur pour l'analyse sémantique AMR en français", booktitle = "Actes de CORIA-TALN 2026. Actes des 33ème Conférence sur le Traitement Automatique des Langues Naturelles. Volume 1 : articles scientifiques originaux", month = "6", year = "2026", address = "Nantes, France", publisher = "Association pour le Traitement Automatique des Langues", pages = "610-620", url = "https://talnarchives.atala.org/TALN/TALN-2026/19.pdf" }
- Downloads last month
- 39
Model tree for AdrienGuille/GemmAMR-fr-v1
Base model
google/translategemma-4b-it