Tokenizer update
Browse files- config.json +6 -1
- model.py +1 -0
config.json
CHANGED
@@ -1,13 +1,18 @@
|
|
1 |
{
|
|
|
|
|
|
|
2 |
"audio_enc_dim": 1024,
|
3 |
"audio_encoder_name": "microsoft/wavlm-large",
|
4 |
"audio_processor_name": "microsoft/wavlm-base",
|
5 |
"auto_map": {
|
6 |
-
"AutoConfig": "config.SpeechLLMModelConfig"
|
|
|
7 |
},
|
8 |
"llm_dim": 2048,
|
9 |
"llm_model_checkpoint": "hf_repo/llm_model_checkpoint",
|
10 |
"llm_model_name": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
11 |
"model_type": "custom_model",
|
|
|
12 |
"transformers_version": "4.41.2"
|
13 |
}
|
|
|
1 |
{
|
2 |
+
"architectures": [
|
3 |
+
"SpeechLLMModel"
|
4 |
+
],
|
5 |
"audio_enc_dim": 1024,
|
6 |
"audio_encoder_name": "microsoft/wavlm-large",
|
7 |
"audio_processor_name": "microsoft/wavlm-base",
|
8 |
"auto_map": {
|
9 |
+
"AutoConfig": "config.SpeechLLMModelConfig",
|
10 |
+
"AutoModel": "model.SpeechLLMModel"
|
11 |
},
|
12 |
"llm_dim": 2048,
|
13 |
"llm_model_checkpoint": "hf_repo/llm_model_checkpoint",
|
14 |
"llm_model_name": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
15 |
"model_type": "custom_model",
|
16 |
+
"torch_dtype": "float32",
|
17 |
"transformers_version": "4.41.2"
|
18 |
}
|
model.py
CHANGED
@@ -49,6 +49,7 @@ class SpeechLLMModel(PreTrainedModel):
|
|
49 |
llm_config = AutoConfig.from_pretrained(config.llm_model_name)
|
50 |
self.llm_model = AutoModelForCausalLM.from_config(llm_config)
|
51 |
self.llm_tokenizer = AutoTokenizer.from_pretrained(config.llm_model_name)
|
|
|
52 |
|
53 |
peft_config = LoraConfig(
|
54 |
r=8,
|
|
|
49 |
llm_config = AutoConfig.from_pretrained(config.llm_model_name)
|
50 |
self.llm_model = AutoModelForCausalLM.from_config(llm_config)
|
51 |
self.llm_tokenizer = AutoTokenizer.from_pretrained(config.llm_model_name)
|
52 |
+
self.llm_tokenizer.pad_token = self.llm_tokenizer.eos_token
|
53 |
|
54 |
peft_config = LoraConfig(
|
55 |
r=8,
|