File size: 2,643 Bytes
1bbd67e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---

language: vi
base_model: meta-llama/Meta-Llama-3-8B-Instruct
tags:
- interview
- conversational
- vietnamese
- llama3
- peft
- lora
license: llama3
pipeline_tag: text-generation
---


# AI Interview Model - Llama 3 8B

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.

## Model Details

- **Base Model:** meta-llama/Meta-Llama-3-8B-Instruct
- **Training Method:** LoRA/QLoRA adapter
- **Language:** Vietnamese (Tiếng Việt)
- **Task:** Conversational AI for Job Interviews

## Cách sử dụng

### Sử dụng với PEFT (Recommended)

```python

from transformers import AutoTokenizer, AutoModelForCausalLM

from peft import PeftModel

import torch



# Load tokenizer

tokenizer = AutoTokenizer.from_pretrained("Mphuc213222/ai-interview")



# Load base model

base_model = AutoModelForCausalLM.from_pretrained(

    "meta-llama/Meta-Llama-3-8B-Instruct",

    torch_dtype=torch.float16,

    device_map="auto"

)



# Load LoRA adapter

model = PeftModel.from_pretrained(base_model, "Mphuc213222/ai-interview")



# Tạo câu hỏi phỏng vấn

messages = [

    {"role": "system", "content": "Bạn là một AI interviewer chuyên nghiệp."},

    {"role": "user", "content": "Tạo câu hỏi phỏng vấn cho vị trí Python Developer"}

]



inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)

outputs = model.generate(inputs, max_length=500, temperature=0.7, top_p=0.9)

response = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(response)

```

### Sử dụng nhanh

```python

from transformers import pipeline



pipe = pipeline(

    "text-generation",

    model="Mphuc213222/ai-interview",

    model_kwargs={"torch_dtype": "float16"},

    device_map="auto"

)



result = pipe("Tạo câu hỏi phỏng vấn technical cho vị trí Senior Backend Developer")

print(result[0]['generated_text'])

```

## Training Details

- **Training arguments:** Xem `adapter_config.json`
- **Tokenizer config:** Xem `tokenizer_config.json`
- **Special tokens:** Xem `special_tokens_map.json`

## Use Cases

1. Tạo câu hỏi phỏng vấn tự động
2. Đánh giá câu trả lời của ứng viên
3. Tư vấn career và phỏng vấn
4. Simulation phỏng vấn cho ứng viên

## Limitations

- Model được fine-tune chủ yếu cho tiếng Việt
- Cần GPU để chạy hiệu quả (8GB+ VRAM recommended)
- LoRA adapter cần base model để hoạt động

## License

Model tuân theo Llama 3 Community License Agreement.