初始化项目,由ModelHub XC社区提供模型
Model: prithivMLmods/Bellatrix-1.5B-xElite Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
*.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
|
||||||
229
README.md
Normal file
229
README.md
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
---
|
||||||
|
license: apache-2.0
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
library_name: transformers
|
||||||
|
base_model:
|
||||||
|
- Qwen/Qwen2.5-1.5B-Instruct
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
model-index:
|
||||||
|
- name: Bellatrix-1.5B-xElite
|
||||||
|
results:
|
||||||
|
- task:
|
||||||
|
type: text-generation
|
||||||
|
name: Text Generation
|
||||||
|
dataset:
|
||||||
|
name: IFEval (0-Shot)
|
||||||
|
type: wis-k/instruction-following-eval
|
||||||
|
split: train
|
||||||
|
args:
|
||||||
|
num_few_shot: 0
|
||||||
|
metrics:
|
||||||
|
- type: inst_level_strict_acc and prompt_level_strict_acc
|
||||||
|
value: 19.64
|
||||||
|
name: averaged accuracy
|
||||||
|
source:
|
||||||
|
url: >-
|
||||||
|
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite
|
||||||
|
name: Open LLM Leaderboard
|
||||||
|
- task:
|
||||||
|
type: text-generation
|
||||||
|
name: Text Generation
|
||||||
|
dataset:
|
||||||
|
name: BBH (3-Shot)
|
||||||
|
type: SaylorTwift/bbh
|
||||||
|
split: test
|
||||||
|
args:
|
||||||
|
num_few_shot: 3
|
||||||
|
metrics:
|
||||||
|
- type: acc_norm
|
||||||
|
value: 9.49
|
||||||
|
name: normalized accuracy
|
||||||
|
source:
|
||||||
|
url: >-
|
||||||
|
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite
|
||||||
|
name: Open LLM Leaderboard
|
||||||
|
- task:
|
||||||
|
type: text-generation
|
||||||
|
name: Text Generation
|
||||||
|
dataset:
|
||||||
|
name: MATH Lvl 5 (4-Shot)
|
||||||
|
type: lighteval/MATH-Hard
|
||||||
|
split: test
|
||||||
|
args:
|
||||||
|
num_few_shot: 4
|
||||||
|
metrics:
|
||||||
|
- type: exact_match
|
||||||
|
value: 12.61
|
||||||
|
name: exact match
|
||||||
|
source:
|
||||||
|
url: >-
|
||||||
|
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite
|
||||||
|
name: Open LLM Leaderboard
|
||||||
|
- task:
|
||||||
|
type: text-generation
|
||||||
|
name: Text Generation
|
||||||
|
dataset:
|
||||||
|
name: GPQA (0-shot)
|
||||||
|
type: Idavidrein/gpqa
|
||||||
|
split: train
|
||||||
|
args:
|
||||||
|
num_few_shot: 0
|
||||||
|
metrics:
|
||||||
|
- type: acc_norm
|
||||||
|
value: 3.8
|
||||||
|
name: acc_norm
|
||||||
|
source:
|
||||||
|
url: >-
|
||||||
|
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite
|
||||||
|
name: Open LLM Leaderboard
|
||||||
|
- task:
|
||||||
|
type: text-generation
|
||||||
|
name: Text Generation
|
||||||
|
dataset:
|
||||||
|
name: MuSR (0-shot)
|
||||||
|
type: TAUR-Lab/MuSR
|
||||||
|
args:
|
||||||
|
num_few_shot: 0
|
||||||
|
metrics:
|
||||||
|
- type: acc_norm
|
||||||
|
value: 4.44
|
||||||
|
name: acc_norm
|
||||||
|
source:
|
||||||
|
url: >-
|
||||||
|
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite
|
||||||
|
name: Open LLM Leaderboard
|
||||||
|
- task:
|
||||||
|
type: text-generation
|
||||||
|
name: Text Generation
|
||||||
|
dataset:
|
||||||
|
name: MMLU-PRO (5-shot)
|
||||||
|
type: TIGER-Lab/MMLU-Pro
|
||||||
|
config: main
|
||||||
|
split: test
|
||||||
|
args:
|
||||||
|
num_few_shot: 5
|
||||||
|
metrics:
|
||||||
|
- type: acc
|
||||||
|
value: 7.3
|
||||||
|
name: accuracy
|
||||||
|
source:
|
||||||
|
url: >-
|
||||||
|
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite
|
||||||
|
name: Open LLM Leaderboard
|
||||||
|
tags:
|
||||||
|
- qwen
|
||||||
|
- qwq
|
||||||
|
---
|
||||||
|
<pre align="center">
|
||||||
|
____ ____ __ __ __ ____ ____ ____ _ _
|
||||||
|
( _ \( ___)( ) ( ) /__\ (_ _)( _ \(_ _)( \/ )
|
||||||
|
) _ < )__) )(__ )(__ /(__)\ )( ) / _)(_ ) (
|
||||||
|
(____/(____)(____)(____)(__)(__)(__) (_)\_)(____)(_/\_)
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
# **Bellatrix-1.5B-xElite**
|
||||||
|
|
||||||
|
Bellatrix-1.5B-xElite is based on a reasoning-based model designed for the QWQ synthetic dataset entries. The pipeline's instruction-tuned, text-only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. These models outperform many of the available open-source options. Bellatrix is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions utilize supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF).
|
||||||
|
|
||||||
|
# **Quickstart with Transformers**
|
||||||
|
|
||||||
|
Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
model_name = "prithivMLmods/Bellatrix-1.5B-xElite"
|
||||||
|
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
|
model_name,
|
||||||
|
torch_dtype="auto",
|
||||||
|
device_map="auto"
|
||||||
|
)
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||||||
|
|
||||||
|
prompt = "Give me a short introduction to large language model."
|
||||||
|
messages = [
|
||||||
|
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
||||||
|
{"role": "user", "content": prompt}
|
||||||
|
]
|
||||||
|
text = tokenizer.apply_chat_template(
|
||||||
|
messages,
|
||||||
|
tokenize=False,
|
||||||
|
add_generation_prompt=True
|
||||||
|
)
|
||||||
|
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
||||||
|
|
||||||
|
generated_ids = model.generate(
|
||||||
|
**model_inputs,
|
||||||
|
max_new_tokens=512
|
||||||
|
)
|
||||||
|
generated_ids = [
|
||||||
|
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
||||||
|
]
|
||||||
|
|
||||||
|
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
||||||
|
```
|
||||||
|
|
||||||
|
# **Intended Use:**
|
||||||
|
|
||||||
|
1. **Multilingual Dialogue Systems:**
|
||||||
|
- Designed for conversational AI applications, capable of handling dialogue across multiple languages.
|
||||||
|
- Useful in customer service, chatbots, and other dialogue-centric use cases.
|
||||||
|
|
||||||
|
2. **Reasoning and QWQ Dataset Applications:**
|
||||||
|
- Optimized for tasks requiring logical reasoning and contextual understanding, particularly in synthetic datasets like QWQ.
|
||||||
|
|
||||||
|
3. **Agentic Retrieval:**
|
||||||
|
- Supports retrieval-augmented generation tasks, helping systems fetch and synthesize information effectively.
|
||||||
|
|
||||||
|
4. **Summarization Tasks:**
|
||||||
|
- Excels in summarizing long or complex text while maintaining coherence and relevance.
|
||||||
|
|
||||||
|
5. **Instruction-Following Tasks:**
|
||||||
|
- Can execute tasks based on specific user instructions due to instruction-tuning during training.
|
||||||
|
|
||||||
|
6. **Language Generation:**
|
||||||
|
- Suitable for generating coherent and contextually relevant text in various domains and styles.
|
||||||
|
|
||||||
|
# **Limitations:**
|
||||||
|
|
||||||
|
1. **Synthetic Dataset Bias:**
|
||||||
|
- Optimization for QWQ and similar datasets may make the model less effective on real-world or less structured data.
|
||||||
|
|
||||||
|
2. **Data Dependency:**
|
||||||
|
- Performance may degrade on tasks or languages not well-represented in the training dataset.
|
||||||
|
|
||||||
|
3. **Computational Requirements:**
|
||||||
|
- The optimized transformer architecture may demand significant computational resources, especially for fine-tuning or large-scale deployments.
|
||||||
|
|
||||||
|
4. **Potential Hallucinations:**
|
||||||
|
- Like most auto-regressive models, it may generate plausible-sounding but factually incorrect or nonsensical outputs.
|
||||||
|
|
||||||
|
5. **RLHF-Specific Biases:**
|
||||||
|
- Reinforcement Learning with Human Feedback (RLHF) can introduce biases based on the preferences of the annotators involved in the feedback process.
|
||||||
|
|
||||||
|
6. **Limited Domain Adaptability:**
|
||||||
|
- While effective in reasoning and dialogue tasks, it may struggle with highly specialized domains or out-of-distribution tasks.
|
||||||
|
|
||||||
|
7. **Multilingual Limitations:**
|
||||||
|
- Although optimized for multilingual use, certain low-resource languages may exhibit poorer performance compared to high-resource ones.
|
||||||
|
|
||||||
|
8. **Ethical Concerns:**
|
||||||
|
- May inadvertently generate inappropriate or harmful content if safeguards are not applied, particularly in sensitive applications.
|
||||||
|
|
||||||
|
9. **Real-Time Usability:**
|
||||||
|
- Latency in inference time could limit its effectiveness in real-time applications or when scaling to large user bases.
|
||||||
|
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
|
||||||
|
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/prithivMLmods__Bellatrix-1.5B-xElite-details)!
|
||||||
|
Summarized results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/contents/viewer/default/train?q=prithivMLmods%2FBellatrix-1.5B-xElite&sort[column]=Average%20%E2%AC%86%EF%B8%8F&sort[direction]=desc)!
|
||||||
|
|
||||||
|
| Metric |Value (%)|
|
||||||
|
|-------------------|--------:|
|
||||||
|
|**Average** | 9.55|
|
||||||
|
|IFEval (0-Shot) | 19.64|
|
||||||
|
|BBH (3-Shot) | 9.49|
|
||||||
|
|MATH Lvl 5 (4-Shot)| 12.61|
|
||||||
|
|GPQA (0-shot) | 3.80|
|
||||||
|
|MuSR (0-shot) | 4.44|
|
||||||
|
|MMLU-PRO (5-shot) | 7.30|
|
||||||
28
config.json
Normal file
28
config.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Qwen2ForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"eos_token_id": 151643,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 1536,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 8960,
|
||||||
|
"max_position_embeddings": 131072,
|
||||||
|
"max_window_layers": 21,
|
||||||
|
"model_type": "qwen2",
|
||||||
|
"num_attention_heads": 12,
|
||||||
|
"num_hidden_layers": 28,
|
||||||
|
"num_key_value_heads": 2,
|
||||||
|
"rms_norm_eps": 1e-06,
|
||||||
|
"rope_theta": 10000,
|
||||||
|
"sliding_window": 4096,
|
||||||
|
"tie_word_embeddings": false,
|
||||||
|
"torch_dtype": "bfloat16",
|
||||||
|
"transformers_version": "4.44.0",
|
||||||
|
"use_cache": true,
|
||||||
|
"use_mrope": false,
|
||||||
|
"use_sliding_window": false,
|
||||||
|
"vocab_size": 151936
|
||||||
|
}
|
||||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||||
9
generation_config.json
Normal file
9
generation_config.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"_from_model_config": true,
|
||||||
|
"bos_token_id": 151646,
|
||||||
|
"eos_token_id": 151643,
|
||||||
|
"do_sample": true,
|
||||||
|
"temperature": 0.6,
|
||||||
|
"top_p": 0.95,
|
||||||
|
"transformers_version": "4.39.3"
|
||||||
|
}
|
||||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:58858233513d76b8703e72eed6ce16807b523328188e13329257fb9594462945
|
||||||
|
size 3554214621
|
||||||
303282
tokenizer.json
Normal file
303282
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
35
tokenizer_config.json
Normal file
35
tokenizer_config.json
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"add_bos_token": true,
|
||||||
|
"add_eos_token": false,
|
||||||
|
"bos_token": {
|
||||||
|
"__type": "AddedToken",
|
||||||
|
"content": "<|begin▁of▁sentence|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": true,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": {
|
||||||
|
"__type": "AddedToken",
|
||||||
|
"content": "<|end▁of▁sentence|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": true,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"legacy": true,
|
||||||
|
"model_max_length": 16384,
|
||||||
|
"pad_token": {
|
||||||
|
"__type": "AddedToken",
|
||||||
|
"content": "<|end▁of▁sentence|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": true,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"sp_model_kwargs": {},
|
||||||
|
"unk_token": null,
|
||||||
|
"tokenizer_class": "LlamaTokenizerFast",
|
||||||
|
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|>'}}{% endif %}"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user