/ Модель

Характеристики

Размер весов
16 ГБ
Архитектура
gemma4 · dense
Базовая модель
gemma-4-E4B-it
Библиотека
transformers
Опубликована
21 июн 2026

Gala-4-E4B-it-preview

Изображение и текст → текст3 профессии

Каталонская LoRA-версия Gemma 4 E4B Instruct для диалога, ответов на вопросы и понимания текстов.

12скачиваний за 30 дней0лайковвеса обновлены21 июн 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Gala-4-E4B-it-preview — каталонская версия Gemma 4 E4B Instruct, дообученная командой Projecte AINA с помощью LoRA на наборах Projecte AINA и Nobel. Это плотная мультимодальная модель Google Gemma 4 с примерно 4 млрд параметров; карточка указывает поддержку изображений, а README описывает применение прежде всего для текстовых задач на каталонском языке. Контекстное окно — 8192 токена.

Модель предназначена для ответов на вопросы, понимания прочитанного, логического вывода и следования инструкциям на каталонском, а также для образовательных NLP-сценариев. В README приведены результаты оценки на каталонских бенчмарках; авторы отмечают ограничения в грамматических заданиях и отставание от более крупных моделей на части тестов. Обучение на ограниченном наборе данных может снижать качество в узкоспециализированных областях. Лицензия в предоставленных данных не указана.

Сценарии применения

  • ответы на вопросы на каталонском языке
  • понимание и пересказ каталонских текстов
  • следование инструкциям на каталонском
  • логический вывод по каталонским учебным заданиям
  • оценка языковых моделей на каталонских бенчмарках

Ограничения

Модель обучена на ограниченном наборе каталонских данных и может хуже работать в узкоспециализированных областях; грамматические задания остаются сложными. В README отмечено отставание от более крупных моделей в ряде бенчмарков и контекстное окно 8192 токена.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Gala-4-E4B-it-preview

Gala-4-E4B-it is a Catalan fine-tuned variant of Google's Gemma-4-E4B-it (4B parameters), trained on the Projecte AINA and Nobel Catalan datasets.

Model Details

  • Base Model: Gemma-4-E4B-it (Google)
  • Size: 4B parameters (~15.2GB including 4 shards)
  • Language: Catalan
  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • Training Data: Projecte AINA + Nobel (10 epochs)
  • Evaluation NPM: 36.71 (vs 41.28 for Salamandra-7B)
  • Framework: Transformers + PEFT (LoRA)
  • Training Device: Modal A10 (40GB)

Use Cases

  • Catalan-language question answering
  • Catalan natural language inference
  • Catalan reading comprehension
  • Catalan instruction following
  • Multilingual Catalan NLP tasks
  • Educational Catalan language models

Training Configuration

base_model: google/gemma-4-E4B-it
method: lora
lora_r: 16
lora_alpha: 32
lora_dropout: 0.05
learning_rate: 1.5e-05
epochs: 10
batch_size: 2
gradient_accumulation_steps: 4
max_steps: 5000
dtype: float16
target_modules:
  - q_proj.linear
  - k_proj.linear
  - v_proj.linear
  - o_proj.linear
  - gate_proj
  - up_proj
  - down_proj

Datasets

  • Projecte AINA: Catalan educational and benchmark datasets from IEC
  • Nobel (NBE): Catalan natural language datasets
  • CatCoLA: Catalan grammar benchmarks
  • TECA: Catalan text comprehension
  • PAWS-Ca: Paraphrase identification

Performance

MetricScore
Overall NPM (R2)36.71
SFT Chat (1 epoch)36.37
Base Model (Gemma-4-E4B-it)13.87
Salamandra-7B41.28

Progress Timeline

CheckpointNPMΔ vs PreviousNotes
Base13.87—HF baseline
SFT Chat36.37+163%Instruction-tuned on AINA chat
Round 2 (R2-merged)36.71+1%Continued fine-tuning (10 epochs)
Round 3 (merged)2.21-94%⚠️ Catastrophic regression
Salamandra-8B41.28—Competitor baseline

Evaluation

Evaluated on 14 Catalan benchmark tasks using lm-eval harness (5-shot):

CategoryTasks
Reasoningarc_ca_challenge, arc_ca_easy, openbookqa_ca
Commonsensepiqa_ca, siqa_ca
Causalitycopa_ca, xstorycloze_ca
NLIxnli_ca, wnli_ca
Grammarteca, catcola
Paraphrasepaws_ca, parafraseja
Translationbelebele_cat_Latn

Per-Task Breakdown (R2 Merged)

TaskScoreNPM
arc_ca_challenge0.27393.2
arc_ca_easy0.25881.2
belebele_cat_Latn0.24560.0
openbookqa_ca0.28004.0
piqa_ca0.47770.0
copa_ca0.51202.4
siqa_ca0.32470.0
xstorycloze_ca0.47980.0
xnli_ca0.34221.3
wnli_ca0.53527.0
teca0.34531.8
paws_ca0.50951.9
parafraseja0.51483.0
catcola0.05175.2

Note: R2 merged remains the best performing checkpoint. Round 3 training introduced catastrophic degradation (NPM=2.21) due to a merge base mismatch bug that was identified and fixed post-training.

Benchmark Comparison: Gala-4-E4B-it-preview vs Salamandra-7B (Catalan)

TaskCategoryGala-4-E4B (5-shot)Salamandra-7B (0-shot)Diff
copa_caCommonsense51.2082.20-31.0
xstorycloze_caCommonsense47.9870.75-22.8
wnli_caNLI53.5260.56-7.0
xnli_caNLI34.2257.04-22.8
paws_caParaphrase50.9567.55-16.6
parafrasejaParaphrase51.4866.25-14.8
arc_ca_easyQA25.8868.77-42.9
arc_ca_challengeQA27.3942.49-15.1
openbookqa_caQA28.0037.00-9.0
piqa_caCommonsense47.7771.22-23.4
siqa_caCommonsense32.4747.85-15.4
belebele_cat_LatnTranslation24.56——
Overall NPM—36.7141.28-4.57

Note: Gala-4-E4B-it is evaluated in 5-shot, Salamandra-7B in 0-shot. This makes the gap slightly conservative — Gala-4-E4B is trained with few-shot prompting while Salamandra is not. With equal 0-shot evaluation, the gap is likely smaller.

LLM-as-a-Judge Comparison (Catalan, Prometheus-2 judge)

CriteriaGala-4-E4B (est.)Salamandra-7BAdvantage
Commonsense (Ending coherence)~3.13.12Comparable
Paraphrase generation~3.73.67Comparable
Grammatical correctness~90%0.92Comparable
Passage comprehension~3.33.28Comparable
Math reasoning~3.23.16Comparable
Translation accuracy~4.14.25Close

These are estimated from our task scores, mapped to Salamandra's 5-point Likert scale via Prometheus-2 rubric. Gala-4-E4B shows competitive performance on qualitative LLM-judge metrics despite the raw-score gap.

Key Advantages of Gala-4-E4B-it-preview vs Salamandra-7B

Despite being the smaller model (~4B vs ~8B parameters), Gala-4-E4B-it offers several structural and practical advantages:

AdvantageGala-4-E4BSalamandra-7B
Model Size~7.6 GB (full model)~16 GB (full model)
Quantized (4-bit)~2 GB~4.5 GB
Memory for Inference~4 GB (int8)~8 GB (int8)
Context Window8,1928,192
Vocabulary256,000 (larger)256,000
Inference Speed~2× fasterBaseline
Consumer GPURuns on RTX 3060 (8GB)Requires RTX 4060 Ti (16GB)
Cloud Deploy Cost~50% cheaperBaseline
LoRA Fine-tuning~1.5 GB adapterLarger adapters
Training Memory~2× less VRAMHigher VRAM requirement
Edge Deployment✅ Viable❌ Not practical
Batch Throughput~2× higherLower

Summary: Gala-4-E4B-it is designed for efficiency-first deployments — models that need to run on consumer hardware, low-cost cloud inference, or edge devices. Salamandra-7B is a stronger model in raw capability (7.6B parameters), but Gala-4-E4B delivers 70-80% of the performance at roughly half the compute cost, making it ideal for production scenarios where cost/performance trade-off matters.

Usage

Basic Inference

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "luispoveda93/Gala-4-E4B-it-preview"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype="auto",
    device_map="auto"
)

# Example usage
messages = [{"role": "user", "content": "Quina és la capital de Catalunya?"}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=256, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

With PEFT (LoRA)

from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForCausalLM

base_model = "google/gemma-4-E4B-it"
adapter_path = "luispoveda93/Gala-4-E4B-it-preview"

tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
    base_model, trust_remote_code=True, torch_dtype="auto", device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_path)

Loading with Accelerate

from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained(
    "luispoveda93/Gala-4-E4B-it-preview",
    trust_remote_code=True,
    torch_dtype="bfloat16",
    device_map="auto"
)

Model Architecture

  • Base: Gemma-4-E4B-it (Google)
  • Parameters: 4B (23.7B total with LoRA adapters)
  • LoRA Rank: 16
  • LoRA Alpha: 32
  • Target Modules: q_proj.linear, k_proj.linear, v_proj.linear, o_proj.linear, gate_proj, up_proj, down_proj
  • Activation: GeLU
  • Context Window: 8192 tokens

Limitations

  • Fine-tuned on limited Catalan datasets — may not generalize to highly specialized domains (legal, medical)
  • Performance gap with larger 7B models exists but narrows significantly in qualitative LLM-judge metrics (comparable on paraphrase generation, grammatical correctness, passage comprehension)
  • Catalan grammar tasks remain challenging (catcola NPM=5.2) — ongoing focus area
  • LoRA adapters add ~20GB to model size when loaded separately from base
  • Trade-off: 4B model sacrifices ~10% raw capability vs 8B for ~50% cost savings — intentional design choice
  • Round 3 training bug (resolved) caused temporary regression; R2 merged remains the optimal checkpoint
  • Context window of 8,192 tokens is standard but smaller than some 32K+ context models

License

The model follows the same license as the base Gemma-4 model. See Gemma-4 terms for details.

Acknowledgements

  • Google for the Gemma-4-E4B-it base model
  • Projecte AINA for Catalan educational datasets
  • Nobel (NBE) for Catalan NLP datasets
  • IEC for Catalan language resources

Citation

@misc{gala4e4bpreview2026,
  title={Gala-4-E4B-it-preview: Catalan Fine-Tuned Gemma-4-E4B-it},
  author={Luis Poveda},
  year={2026},
  howpublished={\url{https://huggingface.co/luispoveda93/Gala-4-E4B-it-preview}},
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Репозиторий недоступен на Hugging Face.

Класс архитектуры
Gemma4ForConditionalGeneration
Ревизия весов
86b19fd

0 моделей