初始化项目,由ModelHub XC社区提供模型
Model: shuvom/yuj-v1 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
|
||||
204
README.md
Normal file
204
README.md
Normal file
@@ -0,0 +1,204 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
tags:
|
||||
- merge
|
||||
- hindi
|
||||
- english
|
||||
- Llama2
|
||||
- ai4bharat/Airavata
|
||||
- BhabhaAI/Gajendra-v0.1
|
||||
model-index:
|
||||
- name: yuj-v1
|
||||
results:
|
||||
- task:
|
||||
type: text-generation
|
||||
name: Text Generation
|
||||
dataset:
|
||||
name: AI2 Reasoning Challenge (25-Shot)
|
||||
type: ai2_arc
|
||||
config: ARC-Challenge
|
||||
split: test
|
||||
args:
|
||||
num_few_shot: 25
|
||||
metrics:
|
||||
- type: acc_norm
|
||||
value: 45.65
|
||||
name: normalized accuracy
|
||||
source:
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=shuvom/yuj-v1
|
||||
name: Open LLM Leaderboard
|
||||
- task:
|
||||
type: text-generation
|
||||
name: Text Generation
|
||||
dataset:
|
||||
name: HellaSwag (10-Shot)
|
||||
type: hellaswag
|
||||
split: validation
|
||||
args:
|
||||
num_few_shot: 10
|
||||
metrics:
|
||||
- type: acc_norm
|
||||
value: 70.1
|
||||
name: normalized accuracy
|
||||
source:
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=shuvom/yuj-v1
|
||||
name: Open LLM Leaderboard
|
||||
- task:
|
||||
type: text-generation
|
||||
name: Text Generation
|
||||
dataset:
|
||||
name: MMLU (5-Shot)
|
||||
type: cais/mmlu
|
||||
config: all
|
||||
split: test
|
||||
args:
|
||||
num_few_shot: 5
|
||||
metrics:
|
||||
- type: acc
|
||||
value: 43.78
|
||||
name: accuracy
|
||||
source:
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=shuvom/yuj-v1
|
||||
name: Open LLM Leaderboard
|
||||
- task:
|
||||
type: text-generation
|
||||
name: Text Generation
|
||||
dataset:
|
||||
name: TruthfulQA (0-shot)
|
||||
type: truthful_qa
|
||||
config: multiple_choice
|
||||
split: validation
|
||||
args:
|
||||
num_few_shot: 0
|
||||
metrics:
|
||||
- type: mc2
|
||||
value: 41.69
|
||||
source:
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=shuvom/yuj-v1
|
||||
name: Open LLM Leaderboard
|
||||
- task:
|
||||
type: text-generation
|
||||
name: Text Generation
|
||||
dataset:
|
||||
name: Winogrande (5-shot)
|
||||
type: winogrande
|
||||
config: winogrande_xl
|
||||
split: validation
|
||||
args:
|
||||
num_few_shot: 5
|
||||
metrics:
|
||||
- type: acc
|
||||
value: 69.85
|
||||
name: accuracy
|
||||
source:
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=shuvom/yuj-v1
|
||||
name: Open LLM Leaderboard
|
||||
- task:
|
||||
type: text-generation
|
||||
name: Text Generation
|
||||
dataset:
|
||||
name: GSM8k (5-shot)
|
||||
type: gsm8k
|
||||
config: main
|
||||
split: test
|
||||
args:
|
||||
num_few_shot: 5
|
||||
metrics:
|
||||
- type: acc
|
||||
value: 4.78
|
||||
name: accuracy
|
||||
source:
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=shuvom/yuj-v1
|
||||
name: Open LLM Leaderboard
|
||||
---
|
||||
|
||||
# The Model yuj-v1:
|
||||
|
||||
The yuj-v1 model is a blend of advanced models strategically crafted to enhance Hindi Language Models (LLMs) effectively and democratically. Its primary goals include catalyzing the development of Hindi and its communities, making significant contributions to linguistic knowledge. The term "yuj," from Sanskrit, signifies fundamental unity, highlighting the integration of sophisticated technologies to improve the language experience for users in the Hindi-speaking community.
|
||||
|
||||
Official GGUF version: [shuvom/yuj-v1-GGUF](https://huggingface.co/shuvom/yuj-v1-GGUF)
|
||||
|
||||
Below are the model which are leverage to build this yuj-v1:
|
||||
* [ai4bharat/Airavata](https://huggingface.co/ai4bharat/Airavata)
|
||||
* [BhabhaAI/Gajendra-v0.1](https://huggingface.co/BhabhaAI/Gajendra-v0.1)
|
||||
|
||||
## ☄️Space to use it (yuj-v1 tryO):
|
||||
<a target="_blank" href="https://shuvom-yuj-v1-tryo.hf.space">
|
||||
<img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="Open in HuggingFace"/>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
## 💻 Usage:
|
||||
|
||||
First, you need to install some of below packages:
|
||||
|
||||
1. Bits and bytes
|
||||
```python
|
||||
!pip install bitsandbytes
|
||||
```
|
||||
2. Accelerate (to install the latest version)
|
||||
```python
|
||||
!pip install git+https://github.com/huggingface/accelerate.git
|
||||
```
|
||||
3. Usage
|
||||
```python
|
||||
# Usage
|
||||
import torch
|
||||
|
||||
# Load model directly
|
||||
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||
|
||||
# load the model in 4-bit quantization
|
||||
tokenizer = AutoTokenizer.from_pretrained("shuvom/yuj-v1")
|
||||
model = AutoModelForCausalLM.from_pretrained("shuvom/yuj-v1",torch_dtype=torch.bfloat16,load_in_4bit=True)
|
||||
|
||||
prompt = "युज शीर्ष द्विभाषी मॉडल में से एक है"
|
||||
inputs = tokenizer(prompt, return_tensors="pt")
|
||||
|
||||
# Generate
|
||||
generate_ids = model.generate(inputs.input_ids, max_length=65)
|
||||
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
||||
```
|
||||
4. Output
|
||||
```python
|
||||
युज शीर्ष द्विभाषी मॉडल में से एक है। यह एक उत्पादक मॉडल है जो एक साथ एक ट्रांसफॉर्मर और एक आत्म-ध्यान तंत्रिका नेटवर्क को जोड़ता है। यह एक ट्रांसफॉर्मर वास्तुकला का उपयोग करता है जो एक ट्रांसफॉर्मर मॉडल की तुलना में बहुत अधिक जटिल है।
|
||||
```
|
||||
|
||||
## 🧩 Configuration
|
||||
|
||||
```yaml
|
||||
models:
|
||||
- model: sarvamai/OpenHathi-7B-Hi-v0.1-Base
|
||||
# no parameters necessary for base model
|
||||
- model: ai4bharat/Airavata
|
||||
parameters:
|
||||
density: 0.5
|
||||
weight: 0.5
|
||||
- model: BhabhaAI/Gajendra-v0.1
|
||||
parameters:
|
||||
density: 0.5
|
||||
weight: 0.3
|
||||
merge_method: ties
|
||||
base_model: sarvamai/OpenHathi-7B-Hi-v0.1-Base
|
||||
parameters:
|
||||
normalize: true
|
||||
dtype: float16
|
||||
```
|
||||
|
||||
|
||||
|
||||
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
||||
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_shuvom__yuj-v1)
|
||||
|
||||
| Metric |Value|
|
||||
|---------------------------------|----:|
|
||||
|Avg. |45.97|
|
||||
|AI2 Reasoning Challenge (25-Shot)|45.65|
|
||||
|HellaSwag (10-Shot) |70.10|
|
||||
|MMLU (5-Shot) |43.78|
|
||||
|TruthfulQA (0-shot) |41.69|
|
||||
|Winogrande (5-shot) |69.85|
|
||||
|GSM8k (5-shot) | 4.78|
|
||||
|
||||
27
config.json
Normal file
27
config.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"_name_or_path": "sarvamai/OpenHathi-7B-Hi-v0.1-Base",
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 11008,
|
||||
"max_position_embeddings": 4096,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 32,
|
||||
"num_key_value_heads": 32,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "float16",
|
||||
"transformers_version": "4.35.2",
|
||||
"use_cache": true,
|
||||
"vocab_size": 48064
|
||||
}
|
||||
17
mergekit_config.yml
Normal file
17
mergekit_config.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
models:
|
||||
- model: sarvamai/OpenHathi-7B-Hi-v0.1-Base
|
||||
# no parameters necessary for base model
|
||||
- model: ai4bharat/Airavata
|
||||
parameters:
|
||||
density: 0.5
|
||||
weight: 0.5
|
||||
- model: BhabhaAI/Gajendra-v0.1
|
||||
parameters:
|
||||
density: 0.5
|
||||
weight: 0.3
|
||||
merge_method: ties
|
||||
base_model: sarvamai/OpenHathi-7B-Hi-v0.1-Base
|
||||
parameters:
|
||||
normalize: true
|
||||
dtype: float16
|
||||
3
model-00001-of-00008.safetensors
Normal file
3
model-00001-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad98b6a6c009100f1715356fc618c9c5c3215566b5e6b536ba5dda3175a5aab5
|
||||
size 1933644496
|
||||
3
model-00002-of-00008.safetensors
Normal file
3
model-00002-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:66ad1abfdaf707a8da9c18501c9551ceb8a7f860353022f912024d0e5fbd9439
|
||||
size 1933661104
|
||||
3
model-00003-of-00008.safetensors
Normal file
3
model-00003-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:287f854daf30f07f2ecc7dd75cd21412dbadafbf4eac9fa61b438482edbc18d3
|
||||
size 1922617168
|
||||
3
model-00004-of-00008.safetensors
Normal file
3
model-00004-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5f62ed8e0f3cbb70a363d81aa6ded42074579373d0ce7d5de7c91d7dcb4630fc
|
||||
size 1933661144
|
||||
3
model-00005-of-00008.safetensors
Normal file
3
model-00005-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1aab4a111a752c151aed90a7349792ba991844f1600355f6186d5cfc2cf9fb9f
|
||||
size 1933661136
|
||||
3
model-00006-of-00008.safetensors
Normal file
3
model-00006-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0108ae671a194d025c749c1a08fbe859bc54b9ee2e9745a942c8599f9862e66c
|
||||
size 1968779184
|
||||
3
model-00007-of-00008.safetensors
Normal file
3
model-00007-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1bf977193781334ffff1e8f66063602eedf05033a48c82ec5cd8c690c6f2a0ca
|
||||
size 1933661136
|
||||
3
model-00008-of-00008.safetensors
Normal file
3
model-00008-of-00008.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:81944a74859956e9689a5ee0b940c946334da218671714390df35eef4cf8a552
|
||||
size 180371928
|
||||
1
model.safetensors.index.json
Normal file
1
model.safetensors.index.json
Normal file
File diff suppressed because one or more lines are too long
24
special_tokens_map.json
Normal file
24
special_tokens_map.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": "[PAD]",
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
125785
tokenizer.json
Normal file
125785
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
3
tokenizer.model
Normal file
3
tokenizer.model
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9c384835e29a2bcdc9af37e169f13978dc6fbf2f94274f956ed2a42afa4b7e87
|
||||
size 967614
|
||||
47
tokenizer_config.json
Normal file
47
tokenizer_config.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32000": {
|
||||
"content": "[PAD]",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"bos_token": "<s>",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "</s>",
|
||||
"legacy": false,
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"pad_token": "[PAD]",
|
||||
"sp_model_kwargs": {},
|
||||
"spaces_between_special_tokens": false,
|
||||
"tokenizer_class": "LlamaTokenizer",
|
||||
"unk_token": "<unk>",
|
||||
"use_default_system_prompt": false
|
||||
}
|
||||
Reference in New Issue
Block a user