Downloads · 30 days
21
1% of all-time downloads
aiplanet/LuxLlama
LuxLlama is a text generation model from aiplanet. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
LuxLlama is a fine-tuned iteration of the Meta-Llama-3.1-8B-Instruct model, specifically adapted to enhance capabilities in Luxembourgish language understanding and generation, alongside general and mathematical reaso…
Downloads · 30 days
21
1% of all-time downloads
All-time downloads
3.6K
Public
Parameters
8.2B
8.4 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
U87.2B · 87%
From the Hugging Face model README
LuxLlama is a fine-tuned iteration of the Meta-Llama-3.1-8B-Instruct model, specifically adapted to enhance capabilities in Luxembourgish language understanding and generation, alongside general and mathematical reasoning. The model was trained on a diverse dataset combining reasoning benchmarks and cleaned Luxembourgish text, utilizing Parameter-Efficient Fine-Tuning (PEFT) with LoRA and optimized using the Liger kernel for efficiency. Its performance is evaluated using the custom LUXELLA benchmark, demonstrating strong capabilities in areas like translation and comprehension, while highlighting areas for improvement in nuanced vocabulary and grammar.The fine-tuning process utilized the computational resources provided by Meluxina, a high-performance computing (HPC) platform operated by LuxProvide.
unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bitThe goal of LuxLlama is to create a language model proficient in both complex reasoning and the nuances of the Luxembourgish language. By leveraging a powerful base model (Llama 3.1 8B Instruct) and fine-tuning it on a curated mix of reasoning and language-specific datasets, LuxLlama aims to serve as a capable tool for tasks requiring Luxembourgish language skills and logical deduction. This model card details its architecture, training process, data, and evaluation results on the LUXELLA benchmark.
Meluxina is Luxembourg's national supercomputer, launched in June 2021 by LuxProvide. It is built on the EVIDEN BullSequana XH2000 platform and provides:
Meluxina was ranked 36th globally and recognized as the greenest supercomputer in the EU within the Top500 ranking. Named after Luxembourg's legend of the mermaid Melusina, it symbolizes digital innovation and employs water-cooling technology for energy efficiency.
The development of LuxLlama builds upon existing work in:
The fine-tuning dataset was compiled from the following sources:
KingNish/reasoning-base-20kSkunkworksAI/reasoning-0.01AI-MO/NuminaMath-CoTsaillab/alpaca-luxembourgish-cleanedunsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit loaded with 4-bit quantization (load_in_4bit=True).trl.SFTTrainer.get_peft_model).SFTConfig):use_liger=True) for increased throughput and reduced memory usage via optimized Triton kernels for common LLM operations.!pip -q install vllm
!pip -q install bitsandbytes>=0.45.3
import os
import torch
from vllm import LLM
from vllm import SamplingParams
os.environ['VLLM_USE_V1'] = '0'
model_id = "aiplanet/LuxLlama"
llm = LLM(model=model_id, dtype=torch.bfloat16, trust_remote_code=True, max_model_len=8192)
prompts = [
"""
<system>
You are a highly capable assistant trained to handle a variety of tasks. Below is an instruction that describes a task, paired with an input that provides further context. Your goal is to provide an accurate, clear, and contextually appropriate response that fulfills the user's request.
</system>
<user>
### Instruction:
Berechent d'Resultat vun dëser Rechnung.
### Input:
Wéi vill ass (12 + 8) × 2 - 10?
</user>
<assistant>
""",
"""
<system>
You are a highly capable assistant trained to handle a variety of tasks. Below is an instruction that describes a task, paired with an input that provides further context. Your goal is to provide an accurate, clear, and contextually appropriate response that fulfills the user's request.
</system>
<user>
### Instruction:
Iwwersetz dësen Saz vum Engleschen an d’Lëtzebuergesch.
### Input:
'We are going to the market tomorrow morning.'
</user>
<assistant>
""",
"""
<system>
You are a highly capable assistant trained to handle a variety of tasks. Below is an instruction that describes a task, paired with an input that provides further context. Your goal is to provide an accurate, clear, and contextually appropriate response that fulfills the user's request.
</system>
<user>
### Instruction:
Beäntwert d’Fro mat gesonde Mënscheverstand.
### Input:
Kann een engem Bësch eng Email schécken? Firwat oder firwat net?
</user>
<assistant>
""",
]
# Create a sampling params object.
sampling_params = SamplingParams(temperature=0.1, top_p=0.1, top_k=1, max_tokens=1024)
def main(llm):
# Create an LLM.
llm = llm
# Generate texts from the prompts.
# The output is a list of RequestOutput objects
# that contain the prompt, generated text, and other information.
outputs = llm.generate(prompts, sampling_params)
# Print the outputs.
print("\nGenerated Outputs:\n" + "-" * 60)
for output in outputs:
prompt = output.prompt
generated_text = output.outputs[0].text
print(f"Prompt: {prompt!r}")
print(f"Output: {generated_text!r}")
print("-" * 60)
if __name__ == "__main__":
main(llm)
Generated Outputs:
------------------------------------------------------------
Prompt: "\n<system> \nYou are a highly capable assistant trained to handle a variety of tasks. Below is an instruction that describes a task, paired with an input that provides further context. Your goal is to provide an accurate, clear, and contextually appropriate response that fulfills the user's request. \n</system> \n<user> \n### Instruction: \nBerechent d'Resultat vun dëser Rechnung. \n\n### Input: \nWéi vill ass (12 + 8) × 2 - 10?\n</user> \n\n<assistant>\n"
Output: "### Response:\n D'Resultat vun der Rechnung ass 30. Hei ass d'Schrëtt-fir-Schrëtt Berechnung: 1. Füügt 12 an 8: 12 + 8 = 20 2. Multiplizéiert d'Resultat mat 2: 20 × 2 = 40 3. Subtrahéiert 10 vum Resultat: 40 - 10 = 30\n</assistant> \n"
------------------------------------------------------------
Prompt: "\n<system> \nYou are a highly capable assistant trained to handle a variety of tasks. Below is an instruction that describes a task, paired with an input that provides further context. Your goal is to provide an accurate, clear, and contextually appropriate response that fulfills the user's request. \n</system> \n<user> \n### Instruction: \nIwwersetz dësen Saz vum Engleschen an d’Lëtzebuergesch. \n\n### Input: \n'We are going to the market tomorrow morning.'\n</user> \n\n<assistant>\n"
Output: "### Response:\n 'Mir ginn muer fréi op de Maart.'\n</assistant> \n"
------------------------------------------------------------
Prompt: "\n<system> \nYou are a highly capable assistant trained to handle a variety of tasks. Below is an instruction that describes a task, paired with an input that provides further context. Your goal is to provide an accurate, clear, and contextually appropriate response that fulfills the user's request. \n</system> \n<user> \n### Instruction: \nBeäntwert d’Fro mat gesonde Mënscheverstand. \n\n### Input: \nKann een engem Bësch eng Email schécken? Firwat oder firwat net?\n</user> \n\n<assistant>\n"
Output: "### Response:\n Et ass net méiglech eng E-Mail un e Bësch ze schécken. E-Mail ass eng Form vu Kommunikatioun déi fir d'Mënschen entwéckelt gouf, an et erfuerdert eng digital Infrastruktur fir ze funktionéieren, wéi Internet a Computeren. Bëscher, op der anerer Säit, sinn natierlech Liewensraim, déi aus Planzen, Déieren an aner Elementer besteet. Si hunn keng Fäegkeet fir digital Kommunikatioun oder Informatioun ze verstoen, also kann keng E-Mail un e Bësch geschéckt ginn.\n</assistant> \n"
------------------------------------------------------------
LuxLlama Performance on LUXELLA:
Scores by Category:
| Category | Score |
|---|---|
| translation_to_english | 83.8 |
| reading_comprehension | 82.8 |
| verb_conjugation | 82.2 |
| multiple_choice | 81.6 |
| translation_from_english | 81.4 |
| translation | 80.0 |
| listening_comprehension_simulation | 79.6 |
| conversation | 75.8 |
| word_order | 75.8 |
| cultural_knowledge | 75.2 |
| writing_prompt | 74.8 |
| grammar | 68.8 |
| idioms_and_expressions | 67.4 |
| sentence_completion | 62.2 |
| spelling_and_pronunciation | 60.8 |
| vocabulary | 60.0 |
Scores by Difficulty:
| Difficulty | Score |
|---|---|
| beginner | 78.6 |
| intermediate | 73.8 |
| advanced | 73.6 |
| native | 71.4 |
Comparative Performance:
| Model | Overall Score (LUXELLA) |
|---|---|
| LuxLlama (Ours) | 74.6 |
| gemma2-9b-it | 61.4 |
| llama-3.1-8b-instant | 49.2 |
| mixtral-8x7b-32768 | 48.8 |
Summary: LuxLlama demonstrates strong performance on the LUXELLA benchmark, outperforming other tested models significantly. It excels in translation, comprehension, and verb conjugation. Areas like vocabulary, spelling, and idioms show relatively lower scores, indicating room for improvement in capturing finer linguistic nuances. The model handles beginner-level tasks very well, with a gradual decrease in performance as difficulty increases, validating the benchmark's sensitivity. Sample high-performing questions show correct handling of cultural knowledge, spelling, and advanced verb conjugation, while low-performing samples highlight challenges with specific grammar rules (Konjunktiv II usage), subtle distinctions in vocabulary (Niess vs Kusinn), and standard word order conventions.
(This section should be updated after further analysis and usage.)
This work leverages computational resources and support from Meluxina by LuxProvide.
<img src="https://www.luxprovide.lu/wp-content/themes/luxprovide2023/public/images/logo/logo_notagline_color_blue.4b07cb.svg" alt="LuxProvide Logo" width="50%"> <img src="https://docs.lxp.lu/FAQ/images/MeluXina_Logo.png" alt="Meluxina Logo" width="50%">