Improve language tag

#1
by lbourdois - opened
Files changed (1) hide show
  1. README.md +82 -79
README.md CHANGED
@@ -1,80 +1,83 @@
1
- ---
2
- base_model: Qwen/Qwen2.5-32B-Instruct
3
- library_name: peft
4
- license: mit
5
- language:
6
- - en
7
- - ko
8
- - zh
9
- - pt
10
- - ja
11
- - uz
12
- - tl
13
- - th
14
- - vi
15
- - id
16
- ---
17
- # FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6
18
-
19
- ## Overview
20
- `FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6` is a powerful causal language model designed for a variety of natural language processing (NLP) tasks, including machine translation, text generation, and chat-based applications. This model is particularly useful for translating between Korean and Uzbek, as well as supporting other custom NLP tasks through flexible input.
21
-
22
- ## Model Details
23
- - **Model ID**: `FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6`
24
- - **Architecture**: Causal Language Model (LM)
25
- - **Parameters**: 32 billion
26
- - **Precision**: Torch BF16 for efficient GPU memory usage
27
- - **Attention**: SDPA (Scaled Dot-Product Attention)
28
- - **Primary Use Case**: Translation (e.g., Korean to Uzbek), text generation, and dialogue systems.
29
-
30
- ## Example Usage
31
-
32
- ### Installation
33
- Make sure to install the required packages:
34
-
35
- ```bash
36
- pip install torch transformers
37
- ```
38
- ### Loading the Model
39
-
40
- ```python
41
- from transformers import AutoTokenizer, AutoModelForCausalLM
42
- import torch
43
-
44
- # Model and Tokenizer
45
- model_id = 'FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6'
46
- model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="sdpa", torch_dtype=torch.bfloat16)
47
- tokenizer = AutoTokenizer.from_pretrained(model_id)
48
- model.to('cuda')
49
-
50
- # Input Messages for Translation
51
- messages = [
52
- {"role": "system", "content": "translate korean to Uzbek"},
53
- {"role": "user", "content": """์ƒˆ๋กœ์šด ์€ํ–‰ ๊ณ„์ขŒ๋ฅผ ๊ฐœ์„คํ•˜๋Š” ์ ˆ์ฐจ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:
54
-
55
- 1. ๊ณ„์ขŒ ๊ฐœ์„ค ๋ชฉ์ ๊ณผ ์‹ ๋ถ„ ํ™•์ธ์„ ์œ„ํ•œ ์„œ๋ฅ˜ ์ œ์ถœ
56
- 2. ์„œ๋ฅ˜ ๊ฒ€ํ†  ๊ณผ์ •์„ ๊ฑฐ์น˜๋Š” ๊ฒƒ
57
- 3. ๊ณ ๊ฐ๋‹˜์˜ ์‹ ์› ํ™•์ธ ์ ˆ์ฐจ๋ฅผ ์ง„ํ–‰ํ•˜๋Š” ๊ฒƒ
58
- 4. ๋ชจ๋“  ์ ˆ์ฐจ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ๊ณ„์ขŒ ๊ฐœ์„ค์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
59
-
60
- ๊ณ„์ขŒ ๊ฐœ์„ค์„ ์›ํ•˜์‹œ๋Š” ๊ฒฝ์šฐ, ์‹ ๋ถ„์ฆ๊ณผ ํ•จ๊ป˜ ๋ฐฉ๋ฌธํ•ด ์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
61
- """},
62
- ]
63
-
64
- # Tokenize and Generate Response
65
- input_ids = tokenizer.apply_chat_template(
66
- messages,
67
- add_generation_prompt=True,
68
- return_tensors="pt"
69
- ).to('cuda')
70
-
71
- outputs = model.generate(
72
- input_ids,
73
- max_new_tokens=500,
74
- do_sample=True,
75
- )
76
-
77
- # Decode and Print the Translation
78
- response = outputs[0][input_ids.shape[-1]:]
79
- print(tokenizer.decode(response, skip_special_tokens=True))
 
 
 
80
  ```
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-32B-Instruct
3
+ library_name: peft
4
+ license: mit
5
+ language:
6
+ - zho
7
+ - eng
8
+ - fra
9
+ - spa
10
+ - por
11
+ - deu
12
+ - ita
13
+ - rus
14
+ - jpn
15
+ - kor
16
+ - vie
17
+ - tha
18
+ - ara
19
+ ---
20
+ # FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6
21
+
22
+ ## Overview
23
+ `FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6` is a powerful causal language model designed for a variety of natural language processing (NLP) tasks, including machine translation, text generation, and chat-based applications. This model is particularly useful for translating between Korean and Uzbek, as well as supporting other custom NLP tasks through flexible input.
24
+
25
+ ## Model Details
26
+ - **Model ID**: `FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6`
27
+ - **Architecture**: Causal Language Model (LM)
28
+ - **Parameters**: 32 billion
29
+ - **Precision**: Torch BF16 for efficient GPU memory usage
30
+ - **Attention**: SDPA (Scaled Dot-Product Attention)
31
+ - **Primary Use Case**: Translation (e.g., Korean to Uzbek), text generation, and dialogue systems.
32
+
33
+ ## Example Usage
34
+
35
+ ### Installation
36
+ Make sure to install the required packages:
37
+
38
+ ```bash
39
+ pip install torch transformers
40
+ ```
41
+ ### Loading the Model
42
+
43
+ ```python
44
+ from transformers import AutoTokenizer, AutoModelForCausalLM
45
+ import torch
46
+
47
+ # Model and Tokenizer
48
+ model_id = 'FINGU-AI/Qwen2.5-32B-Lora-HQ-e-6'
49
+ model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="sdpa", torch_dtype=torch.bfloat16)
50
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
51
+ model.to('cuda')
52
+
53
+ # Input Messages for Translation
54
+ messages = [
55
+ {"role": "system", "content": "translate korean to Uzbek"},
56
+ {"role": "user", "content": """์ƒˆ๋กœ์šด ์€ํ–‰ ๊ณ„์ขŒ๋ฅผ ๊ฐœ์„คํ•˜๋Š” ์ ˆ์ฐจ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:
57
+
58
+ 1. ๊ณ„์ขŒ ๊ฐœ์„ค ๋ชฉ์ ๊ณผ ์‹ ๋ถ„ ํ™•์ธ์„ ์œ„ํ•œ ์„œ๋ฅ˜ ์ œ์ถœ
59
+ 2. ์„œ๋ฅ˜ ๊ฒ€ํ†  ๊ณผ์ •์„ ๊ฑฐ์น˜๋Š” ๊ฒƒ
60
+ 3. ๊ณ ๊ฐ๋‹˜์˜ ์‹ ์› ํ™•์ธ ์ ˆ์ฐจ๋ฅผ ์ง„ํ–‰ํ•˜๋Š” ๊ฒƒ
61
+ 4. ๋ชจ๋“  ์ ˆ์ฐจ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ๊ณ„์ขŒ ๊ฐœ์„ค์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
62
+
63
+ ๊ณ„์ขŒ ๊ฐœ์„ค์„ ์›ํ•˜์‹œ๋Š” ๊ฒฝ์šฐ, ์‹ ๋ถ„์ฆ๊ณผ ํ•จ๊ป˜ ๋ฐฉ๋ฌธํ•ด ์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
64
+ """},
65
+ ]
66
+
67
+ # Tokenize and Generate Response
68
+ input_ids = tokenizer.apply_chat_template(
69
+ messages,
70
+ add_generation_prompt=True,
71
+ return_tensors="pt"
72
+ ).to('cuda')
73
+
74
+ outputs = model.generate(
75
+ input_ids,
76
+ max_new_tokens=500,
77
+ do_sample=True,
78
+ )
79
+
80
+ # Decode and Print the Translation
81
+ response = outputs[0][input_ids.shape[-1]:]
82
+ print(tokenizer.decode(response, skip_special_tokens=True))
83
  ```