indiejoseph commited on
Commit
3f280ee
·
verified ·
1 Parent(s): ec1f515

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -60
README.md CHANGED
@@ -1,75 +1,51 @@
1
  ---
2
  license: other
3
- base_model: hon9kon9ize/Qwen2.5-32B-cpt
4
  tags:
5
  - llama-factory
6
  - full
7
  - generated_from_trainer
 
8
  model-index:
9
- - name: Qwen2.5-32B-sft
10
  results: []
11
  ---
12
 
13
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
- should probably proofread and complete it, then remove this comment. -->
15
 
16
- # Qwen2.5-32B-sft
17
 
18
- This model is a fine-tuned version of [hon9kon9ize/Qwen2.5-32B-cpt](https://huggingface.co/hon9kon9ize/Qwen2.5-32B-cpt) on the sft_v1 dataset.
19
- It achieves the following results on the evaluation set:
20
- - Loss: 1.0515
21
 
22
- ## Model description
23
-
24
- More information needed
25
-
26
- ## Intended uses & limitations
27
-
28
- More information needed
29
-
30
- ## Training and evaluation data
31
-
32
- More information needed
33
-
34
- ## Training procedure
35
 
36
- ### Training hyperparameters
 
37
 
38
- The following hyperparameters were used during training:
39
- - learning_rate: 1e-05
40
- - train_batch_size: 2
41
- - eval_batch_size: 2
42
- - seed: 42
43
- - distributed_type: multi-GPU
44
- - num_devices: 16
45
- - gradient_accumulation_steps: 4
46
- - total_train_batch_size: 128
47
- - total_eval_batch_size: 32
48
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
49
- - lr_scheduler_type: cosine
50
- - lr_scheduler_warmup_ratio: 0.1
51
- - num_epochs: 3.0
52
-
53
- ### Training results
54
-
55
- | Training Loss | Epoch | Step | Validation Loss |
56
- |:-------------:|:------:|:----:|:---------------:|
57
- | 1.042 | 0.2676 | 100 | 1.0254 |
58
- | 0.9872 | 0.5351 | 200 | 1.0064 |
59
- | 1.008 | 0.8027 | 300 | 0.9934 |
60
- | 0.7473 | 1.0702 | 400 | 1.0106 |
61
- | 0.7788 | 1.3378 | 500 | 1.0046 |
62
- | 0.7246 | 1.6054 | 600 | 1.0002 |
63
- | 0.7525 | 1.8729 | 700 | 0.9971 |
64
- | 0.529 | 2.1405 | 800 | 1.0470 |
65
- | 0.5365 | 2.4080 | 900 | 1.0517 |
66
- | 0.5256 | 2.6756 | 1000 | 1.0514 |
67
- | 0.518 | 2.9431 | 1100 | 1.0516 |
68
-
69
-
70
- ### Framework versions
71
-
72
- - Transformers 4.43.3
73
- - Pytorch 2.3.1+cu121
74
- - Datasets 2.20.0
75
- - Tokenizers 0.19.1
 
1
  ---
2
  license: other
3
+ library_name: transformers
4
  tags:
5
  - llama-factory
6
  - full
7
  - generated_from_trainer
8
+ base_model: hon9kon9ize/CantoneseLLM-v1.0-32B-cpt
9
  model-index:
10
+ - name: CantoneseLLMChat-v1.0-32B
11
  results: []
12
  ---
13
 
 
 
14
 
15
+ # CantoneseLLMChat-v1.0-32B
16
 
17
+ ![front_image](cantonese_llm_v1.jpg)
 
 
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ Cantonese LLM Chat v1.0 is the first generation Cantonese LLM from hon9kon9ize.
21
+ Building upon the sucess of [v0.5 preview](https://huggingface.co/hon9kon9ize/CantoneseLLMChat-v0.5), the model excels in Hong Kong related specific knowledge and Cantonese conversation.
22
 
23
+ ## Model description
24
+ Base model obtained via Continuous Pre-Training of [Qwen 2.5 32B](https://huggingface.co/Qwen/Qwen2.5-32B) with 600 millions publicaly available Hong Kong news articles and Cantonese websites.
25
+ Instructions fine-tuned model trained with a dataset consists of 75,000 instrutions pairs. 45,000 pairs were Cantonese insturctions generated by other LLMs and reviewed by humans.
26
+
27
+ The model trained with 1 Nvidia H100 80GB HBM3 GPU on [Genkai Supercomputer](https://www.cc.kyushu-u.ac.jp/scp/eng/system/Genkai/hardware/).
28
+
29
+ ## Basic Usage
30
+ ```
31
+ import torch
32
+ from transformers import AutoTokenizer, AutoModelForCausalLM
33
+ model_id = "hon9kon9ize/CantoneseLLMChat-v1.0-32B"
34
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
35
+ model = AutoModelForCausalLM.from_pretrained(
36
+ model_id,
37
+ torch_dtype=torch.bfloat16,
38
+ device_map="auto",
39
+ )
40
+ def chat(messages, temperature=0.9, max_new_tokens=200):
41
+ input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt').to('cuda:0')
42
+ output_ids = model.generate(input_ids, max_new_tokens=max_new_tokens, temperature=temperature)
43
+ response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=False)
44
+ return response
45
+ prompt = "邊個係香港特首?"
46
+ messages = [
47
+ {"role": "system", "content": "you are a helpful assistant."},
48
+ {"role": "user", "content": prompt}
49
+ ]
50
+ print(chat(messages)) # 香港特別行政區行政長官係李家超。<|im_end|>
51
+ ```