Mphuc213222 commited on
Commit
1bbd67e
·
verified ·
1 Parent(s): 9976fdf

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +97 -0
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: vi
3
+ base_model: meta-llama/Meta-Llama-3-8B-Instruct
4
+ tags:
5
+ - interview
6
+ - conversational
7
+ - vietnamese
8
+ - llama3
9
+ - peft
10
+ - lora
11
+ license: llama3
12
+ pipeline_tag: text-generation
13
+ ---
14
+
15
+ # AI Interview Model - Llama 3 8B
16
+
17
+ Model AI phỏng vấn được fine-tune từ Meta-Llama-3-8B-Instruct sử dụng LoRA/QLoRA, hỗ trợ tiếng Việt.
18
+
19
+ ## Model Details
20
+
21
+ - **Base Model:** meta-llama/Meta-Llama-3-8B-Instruct
22
+ - **Training Method:** LoRA/QLoRA adapter
23
+ - **Language:** Vietnamese (Tiếng Việt)
24
+ - **Task:** Conversational AI for Job Interviews
25
+
26
+ ## Cách sử dụng
27
+
28
+ ### Sử dụng với PEFT (Recommended)
29
+
30
+ ```python
31
+ from transformers import AutoTokenizer, AutoModelForCausalLM
32
+ from peft import PeftModel
33
+ import torch
34
+
35
+ # Load tokenizer
36
+ tokenizer = AutoTokenizer.from_pretrained("Mphuc213222/ai-interview")
37
+
38
+ # Load base model
39
+ base_model = AutoModelForCausalLM.from_pretrained(
40
+ "meta-llama/Meta-Llama-3-8B-Instruct",
41
+ torch_dtype=torch.float16,
42
+ device_map="auto"
43
+ )
44
+
45
+ # Load LoRA adapter
46
+ model = PeftModel.from_pretrained(base_model, "Mphuc213222/ai-interview")
47
+
48
+ # Tạo câu hỏi phỏng vấn
49
+ messages = [
50
+ {"role": "system", "content": "Bạn là một AI interviewer chuyên nghiệp."},
51
+ {"role": "user", "content": "Tạo câu hỏi phỏng vấn cho vị trí Python Developer"}
52
+ ]
53
+
54
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
55
+ outputs = model.generate(inputs, max_length=500, temperature=0.7, top_p=0.9)
56
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
57
+ print(response)
58
+ ```
59
+
60
+ ### Sử dụng nhanh
61
+
62
+ ```python
63
+ from transformers import pipeline
64
+
65
+ pipe = pipeline(
66
+ "text-generation",
67
+ model="Mphuc213222/ai-interview",
68
+ model_kwargs={"torch_dtype": "float16"},
69
+ device_map="auto"
70
+ )
71
+
72
+ result = pipe("Tạo câu hỏi phỏng vấn technical cho vị trí Senior Backend Developer")
73
+ print(result[0]['generated_text'])
74
+ ```
75
+
76
+ ## Training Details
77
+
78
+ - **Training arguments:** Xem `adapter_config.json`
79
+ - **Tokenizer config:** Xem `tokenizer_config.json`
80
+ - **Special tokens:** Xem `special_tokens_map.json`
81
+
82
+ ## Use Cases
83
+
84
+ 1. Tạo câu hỏi phỏng vấn tự động
85
+ 2. Đánh giá câu trả lời của ứng viên
86
+ 3. Tư vấn career và phỏng vấn
87
+ 4. Simulation phỏng vấn cho ứng viên
88
+
89
+ ## Limitations
90
+
91
+ - Model được fine-tune chủ yếu cho tiếng Việt
92
+ - Cần GPU để chạy hiệu quả (8GB+ VRAM recommended)
93
+ - LoRA adapter cần base model để hoạt động
94
+
95
+ ## License
96
+
97
+ Model tuân theo Llama 3 Community License Agreement.