lamhieu commited on
Commit
f0cffd2
1 Parent(s): 9378dcc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +93 -6
README.md CHANGED
@@ -1,7 +1,94 @@
1
  ---
2
- license: mit
3
- language:
4
- - en
5
- - vi
6
- pipeline_tag: text-generation
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ **Ghost 7B Alpha, flying, v0.7.0**
9
+
10
+ ## Model Details
11
+
12
+ ### Model Description
13
+
14
+ This model is fine tuned from **HuggingFaceH4/zephyr-7b-beta** on a small synthetic data set (about 200MB) for 50% English and 50% Vietnamese.
15
+
16
+ - **Developed by:** **Lam H**
17
+ - **Language(s) (NLP):** English, Vietnamese
18
+ - **License:** MIT
19
+ - **Finetuned from model:** [HuggingFaceH4/zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta)
20
+
21
+ ## Uses
22
+
23
+ Feel free to experiment and don't limit your creativity.
24
+
25
+ ```python
26
+ messages = [
27
+ {"role": "system", "content": "You are a helpful assistant."},
28
+ {"role": "user", "content": "nói tôi biết bệnh dịch hạch ở châu Âu do khuẩn nào gây ra"},
29
+ ]
30
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
31
+ tokenized = pipe.tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
32
+ outputs = pipe.model.generate(**tokenized, max_new_tokens=512)
33
+ results = tokenizer.batch_decode(outputs)[0]
34
+ print(results)
35
+
36
+ # Output:
37
+ # Bệnh dịch hạch ở châu Âu do khuẩn gây ra là do khuẩn Yersinia pestis.
38
+ ```
39
+
40
+ ```python
41
+ messages = [
42
+ {"role": "system", "content": "You are a helpful assistant."},
43
+ {"role": "user", "content": "Thông tin về Peristernia despecta"},
44
+ ]
45
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
46
+ tokenized = pipe.tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
47
+ outputs = pipe.model.generate(**tokenized, max_new_tokens=512)
48
+ results = tokenizer.batch_decode(outputs)[0]
49
+ print(results)
50
+
51
+ # Output:
52
+ # Peristernia despecta là một loài ốc biển, là động vật thân mềm chân bụng sống ở biển trong họ Fasciolariidae.
53
+ # ...
54
+ ```
55
+
56
+ ```python
57
+ messages = [
58
+ {"role": "system", "content": "You are a helpful assistant."},
59
+ {"role": "user", "content": "do u know vietnam ?"},
60
+ ]
61
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
62
+ tokenized = pipe.tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
63
+ outputs = pipe.model.generate(**tokenized, max_new_tokens=512)
64
+ results = tokenizer.batch_decode(outputs)[0]
65
+ print(results)
66
+
67
+ # Output:
68
+ # Yes, I have knowledge about Vietnam. Vietnam is a country in Southeast Asia, bordered by China to the north, Laos and Cambodia to the west, and the South China Sea to the east and south. Its capital city is Hanoi, and its largest city is Ho Chi Minh City (formerly known as Saigon). Vietnam has a population of approximately 100 million people and a diverse cultural heritage influenced by both Chinese and French colonialism. The country has a rich history, including periods of independence, colonization, and resistance, and has experienced significant economic growth in recent years.
69
+ ```
70
+
71
+ ```python
72
+ messages = [
73
+ {"role": "system", "content": "You are a helpful assistant, who always provide explanation. Think like you are answering to a five year old."},
74
+ {"role": "user", "content": "Tôi yêu em nhiều hơn em nghĩ.\n\nWhich language is this?"},
75
+ ]
76
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
77
+ tokenized = pipe.tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
78
+ outputs = pipe.model.generate(**tokenized, max_new_tokens=512)
79
+ results = tokenizer.batch_decode(outputs)[0]
80
+ print(results)
81
+
82
+ # Output
83
+ # This is Vietnamese language. Vietnamese is a language spoken mainly in Vietnam and by the Vietnamese diaspora in many other countries. The sentence you provided means "I love you more than you think." It's like you have more love for someone than they realize.
84
+ ```
85
+
86
+ ## More Information
87
+
88
+ Thank you very much [5CD-AI](https://huggingface.co/5CD-AI) and [vilm](https://huggingface.co/vilm), this model uses datasets released by these two organizations.
89
+
90
+ ## Model Card Contact
91
+
92
+ **Lam H** (lamhieu.vk@gmail.com)
93
+
94
+