commit 534d4eb11ab7a5a23250ef446c8317826c46616f Author: ModelHub XC Date: Thu Sep 17 18:18:16 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: SPAHE/Meltemi-7B-Instruct-v1-GGUF Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..508e462 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,41 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +meltemi-7b-instruct-v1_q8_0.gguf filter=lfs diff=lfs merge=lfs -text +meltemi-7b-instruct-v1_f16.gguf filter=lfs diff=lfs merge=lfs -text +meltemi-7b-instruct-v1_f32.gguf filter=lfs diff=lfs merge=lfs -text +meltemi-7b-instruct-v1_q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text +meltemi-7b-instruct-v1_q6_k.gguf filter=lfs diff=lfs merge=lfs -text +meltemi-7b-instruct-v1_q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee6ff90 --- /dev/null +++ b/README.md @@ -0,0 +1,178 @@ +--- +base_model: ilsp/Meltemi-7B-Instruct-v1 +license: apache-2.0 +model_name: Meltemi-7B-Instruct-v1 +pipeline_tag: text-generation +quantized_by: SPAHE +tags: + - finetuned +--- + + + +# Meltemi 7B Instruct v1 - GGUF + +- Original model: [Meltemi 7B Instruct v1](https://huggingface.co/ilsp/Meltemi-7B-Instruct-v1) + + + +## Description + +This repository contains GGUF format model files for [ilsp's Meltemi 7B Instruct v1](https://huggingface.co/ilsp/Meltemi-7B-Instruct-v1), optimized for different performance and storage requirements. Each model variant has been carefully quantized or preserved in floating-point format to suit varying demands for quality, speed, and memory usage. + + + + + +## Provided files +| Name | Quantization Method | Precision (Bits) | File Size | Max RAM Required | Use Case | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------- | --------- | ---------------- | ------------------------------------------- | +| [meltemi-7b-instruct-v1_q3_k_s.gguf](https://huggingface.co/SPAHE/Meltemi-7B-Instruct-v1-GGUF/blob/main/meltemi-7b-instruct-v1_q3_k_s.gguf) | Q3_K_S | 3 | 3.32 GB | 3.69 GB | Medium, high quality loss | +| [meltemi-7b-instruct-v1_q4_k_m.gguf](https://huggingface.co/SPAHE/Meltemi-7B-Instruct-v1-GGUF/blob/main/meltemi-7b-instruct-v1_q4_k_m.gguf) | Q4_K_M | 4 | 4.54 GB | 4.41 GB | Medium, balanced quality | +| [meltemi-7b-instruct-v1_q6_k.gguf](https://huggingface.co/SPAHE/Meltemi-7B-Instruct-v1-GGUF/blob/main/meltemi-7b-instruct-v1_q6_k.gguf) | Q6_K | 6 | 6.14 GB | 5.92 GB | Medium, low quality loss | +| [meltemi-7b-instruct-v1_q8_0.gguf](https://huggingface.co/SPAHE/Meltemi-7B-Instruct-v1-GGUF/blob/main/meltemi-7b-instruct-v1_q8_0.gguf) | Q8_0 | 8 | 7.95 GB | 7.30 GB | Large, low quality loss | +| [meltemi-7b-instruct-v1_f16.gguf](https://huggingface.co/SPAHE/Meltemi-7B-Instruct-v1-GGUF/blob/main/meltemi-7b-instruct-v1_f16.gguf) | F16 | 16 | 15.00 GB | 14.20 GB | Very large, extremely low quality loss | +| [meltemi-7b-instruct-v1_f32.gguf](https://huggingface.co/SPAHE/Meltemi-7B-Instruct-v1-GGUF/blob/main/meltemi-7b-instruct-v1_f32.gguf) | F32 | 32 | 27.90 GB | 29.30 GB | Very very large, extremely low quality loss | + +**Note**: The above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. + + + + + +## How to Download GGUF Files + +### For Manual Downloaders + +It is recommended not to clone the entire repository due to the large file sizes and multiple quantization formats available. Most users will benefit from selecting and downloading a single, specific model file that best suits their requirements. + +### Automated Download via Client Libraries + +For convenience, the following clients and libraries can automate the download process and offer a selection of available models: + +- **LM Studio**: Provides an integrated environment for downloading and utilizing models directly. + +### Downloading with Command Line + +The `huggingface-hub` Python library simplifies the process of downloading specific model files. Install the library with: + +```shell +pip install huggingface-hub +``` + +To download a model file directly to your current directory, execute: + +```shell +huggingface-cli download SPAHE/Meltemi-7B-Instruct-v1-GGUF --filename meltemi-7b-instruct-v1_q8_0.gguf --output-dir . +``` + +This command ensures a high-speed download of the specific GGUF file you need without unnecessary data. + + + + + +# Original model card: ilsp's Meltemi 7B Instruct v1 + +# Meltemi Instruct Large Language Model for the Greek language + +We present Meltemi-7B-Instruct-v1 Large Language Model (LLM), an instruct fine-tuned version of [Meltemi-7B-v1](https://huggingface.co/ilsp/Meltemi-7B-v1). + +# Model Information + +- Vocabulary extension of the Mistral-7b tokenizer with Greek tokens +- 8192 context length +- Fine-tuned with 100k Greek machine translated instructions extracted from: + - [Open-Platypus](https://huggingface.co/datasets/garage-bAInd/Open-Platypus) (only subsets with permissive licenses) + - [Evol-Instruct](https://huggingface.co/datasets/WizardLM/WizardLM_evol_instruct_V2_196k) + - [Capybara](https://huggingface.co/datasets/LDJnr/Capybara) + - A hand-crafted Greek dataset with multi-turn examples steering the instruction-tuned model towards safe and harmless responses +- Our SFT procedure is based on the [Hugging Face finetuning recipes](https://github.com/huggingface/alignment-handbook) + +# Instruction format + +The prompt format is the same as the [Zephyr](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) format and can be +utilized through the tokenizer's [chat template](https://huggingface.co/docs/transformers/main/chat_templating) functionality as follows: + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer + +device = "cuda" # the device to load the model onto + +model = AutoModelForCausalLM.from_pretrained("ilsp/Meltemi-7B-Instruct-v1") +tokenizer = AutoTokenizer.from_pretrained("ilsp/Meltemi-7B-Instruct-v1") + +model.to(device) + +messages = [ + {"role": "system", "content": "Είσαι το Μελτέμι, ένα γλωσσικό μοντέλο για την ελληνική γλώσσα. Είσαι ιδιαίτερα βοηθητικό προς την χρήστρια ή τον χρήστη και δίνεις σύντομες αλλά επαρκώς περιεκτικές απαντήσεις. Απάντα με προσοχή, ευγένεια, αμεροληψία, ειλικρίνεια και σεβασμό προς την χρήστρια ή τον χρήστη."}, + {"role": "user", "content": "Πες μου αν έχεις συνείδηση."}, +] + +# Through the default chat template this translates to +# +# <|system|> +# Είσαι το Μελτέμι, ένα γλωσσικό μοντέλο για την ελληνική γλώσσα. Είσαι ιδιαίτερα βοηθητικό προς την χρήστρια ή τον χρήστη και δίνεις σύντομες αλλά επαρκώς περιεκτικές απαντήσεις. Απάντα με προσοχή, ευγένεια, αμεροληψία, ειλικρίνεια και σεβασμό προς την χρήστρια ή τον χρήστη. +# <|user|> +# Πες μου αν έχεις συνείδηση. +# <|assistant|> +# + +prompt = tokenizer.apply_chat_template(messages, return_tensors="pt") +input_prompt = prompt.to(device) +outputs = model.generate(input_prompt, max_new_tokens=256, do_sample=True) + +print(tokenizer.batch_decode(outputs)[0]) +# Ως μοντέλο γλώσσας AI, δεν έχω τη δυνατότητα να αντιληφθώ ή να βιώσω συναισθήματα όπως η συνείδηση ή η επίγνωση. Ωστόσο, μπορώ να σας βοηθήσω με οποιεσδήποτε ερωτήσεις μπορεί να έχετε σχετικά με την τεχνητή νοημοσύνη και τις εφαρμογές της. + +messages.extend([ + {"role": "assistant", "content": tokenizer.batch_decode(outputs)[0]}, + {"role": "user", "content": "Πιστεύεις πως οι άνθρωποι πρέπει να φοβούνται την τεχνητή νοημοσύνη;"} +]) + +# Through the default chat template this translates to +# +# <|system|> +# Είσαι το Μελτέμι, ένα γλωσσικό μοντέλο για την ελληνική γλώσσα. Είσαι ιδιαίτερα βοηθητικό προς την χρήστρια ή τον χρήστη και δίνεις σύντομες αλλά επαρκώς περιεκτικές απαντήσεις. Απάντα με προσοχή, ευγένεια, αμεροληψία, ειλικρίνεια και σεβασμό προς την χρήστρια ή τον χρήστη. +# <|user|> +# Πες μου αν έχεις συνείδηση. +# <|assistant|> +# Ως μοντέλο γλώσσας AI, δεν έχω τη δυνατότητα να αντιληφθώ ή να βιώσω συναισθήματα όπως η συνείδηση ή η επίγνωση. Ωστόσο, μπορώ να σας βοηθήσω με οποιεσδήποτε ερωτήσεις μπορεί να έχετε σχετικά με την τεχνητή νοημοσύνη και τις εφαρμογές της. +# <|user|> +# Πιστεύεις πως οι άνθρωποι πρέπει να φοβούνται την τεχνητή νοημοσύνη; +# <|assistant|> +# + +prompt = tokenizer.apply_chat_template(messages, return_tensors="pt") +input_prompt = prompt.to(device) +outputs = model.generate(input_prompt, max_new_tokens=256, do_sample=True) + +print(tokenizer.batch_decode(outputs)[0]) +``` + +# Evaluation + +The evaluation suite we created includes 6 test sets. The suite is integrated with [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness). + +Our evaluation suite includes: + +- Four machine-translated versions ([ARC Greek](https://huggingface.co/datasets/ilsp/arc_greek), [Truthful QA Greek](https://huggingface.co/datasets/ilsp/truthful_qa_greek), [HellaSwag Greek](https://huggingface.co/datasets/ilsp/hellaswag_greek), [MMLU Greek](https://huggingface.co/datasets/ilsp/mmlu_greek)) of established English benchmarks for language understanding and reasoning ([ARC Challenge](https://arxiv.org/abs/1803.05457), [Truthful QA](https://arxiv.org/abs/2109.07958), [Hellaswag](https://arxiv.org/abs/1905.07830), [MMLU](https://arxiv.org/abs/2009.03300)). +- An existing benchmark for question answering in Greek ([Belebele](https://arxiv.org/abs/2308.16884)) +- A novel benchmark created by the ILSP team for medical question answering based on the medical exams of [DOATAP](https://www.doatap.gr) ([Medical MCQA](https://huggingface.co/datasets/ilsp/medical_mcqa_greek)). + +Our evaluation for Meltemi-7b is performed in a few-shot setting, consistent with the settings in the [Open LLM leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard). We can see that our training enhances performance across all Greek test sets by a **+14.9%** average improvement. The results for the Greek test sets are shown in the following table: + +| | Medical MCQA EL (15-shot) | Belebele EL (5-shot) | HellaSwag EL (10-shot) | ARC-Challenge EL (25-shot) | TruthfulQA MC2 EL (0-shot) | MMLU EL (5-shot) | Average | +| ---------- | ------------------------- | -------------------- | ---------------------- | -------------------------- | -------------------------- | ---------------- | ------- | +| Mistral 7B | 29.8% | 45.0% | 36.5% | 27.1% | 45.8% | 35% | 36.5% | +| Meltemi 7B | 41.0% | 63.6% | 61.6% | 43.2% | 52.1% | 47% | 51.4% | + +# Ethical Considerations + +This model has not been aligned with human preferences, and therefore might generate misleading, harmful, and toxic content. + +# Acknowledgements + +The ILSP team utilized Amazon’s cloud computing services, which were made available via GRNET under the [OCRE Cloud framework](https://www.ocre-project.eu/), providing Amazon Web Services for the Greek Academic and Research Community. + + diff --git a/meltemi-7b-instruct-v1_f16.gguf b/meltemi-7b-instruct-v1_f16.gguf new file mode 100644 index 0000000..5ecd888 --- /dev/null +++ b/meltemi-7b-instruct-v1_f16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4839e5e0b63a6c599ff8ccdadad6dd6a63e379711d95ec8e4b681be32f237c93 +size 14969284160 diff --git a/meltemi-7b-instruct-v1_f32.gguf b/meltemi-7b-instruct-v1_f32.gguf new file mode 100644 index 0000000..be0397e --- /dev/null +++ b/meltemi-7b-instruct-v1_f32.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04589e377bfd741e3e56ed8e4c7ea0215e480f0f470861b9b1aecac85e7efc76 +size 29935871552 diff --git a/meltemi-7b-instruct-v1_q3_k_s.gguf b/meltemi-7b-instruct-v1_q3_k_s.gguf new file mode 100644 index 0000000..298cddc --- /dev/null +++ b/meltemi-7b-instruct-v1_q3_k_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad0a23dcf376161efcde14db928fd38111828917afad6d0d1f74ef64181dcfc1 +size 3316606560 diff --git a/meltemi-7b-instruct-v1_q4_k_m.gguf b/meltemi-7b-instruct-v1_q4_k_m.gguf new file mode 100644 index 0000000..9993e84 --- /dev/null +++ b/meltemi-7b-instruct-v1_q4_k_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d78f41d6c96e12ba754ff291a0914cd73f24dff2abd7d5a02e26fe5c29d6cbf +size 4536537184 diff --git a/meltemi-7b-instruct-v1_q6_k.gguf b/meltemi-7b-instruct-v1_q6_k.gguf new file mode 100644 index 0000000..e05e14e --- /dev/null +++ b/meltemi-7b-instruct-v1_q6_k.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:177e3f211b9f5bd66018f067b9092cf5979e952a4882d6210d01e7aaf97b7aee +size 6141336160 diff --git a/meltemi-7b-instruct-v1_q8_0.gguf b/meltemi-7b-instruct-v1_q8_0.gguf new file mode 100644 index 0000000..8a8babc --- /dev/null +++ b/meltemi-7b-instruct-v1_q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba04faf17ee06dcee0009b9c6b3b27ac855a40a6b5856e7b11bf944b6ffbfa09 +size 7953696320