How to use from
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"
						}
					}
				]
			}
		]
	}'
Quick Links

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
6
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AdrienGuille/GemmAMR-fr-v1

Finetuned
(25)
this model