Views
No views yet
1from transformers import AutoModel, AutoTokenizer, AutoProcessor
2import torch
3
4# Load model and processor
5model = AutoModel.from_pretrained(
6 "imhmdf/LydiaTM-SKL-32B",
7 torch_dtype=torch.float16,
8 device_map="auto",
9 trust_remote_code=True
10)
11
12processor = AutoProcessor.from_pretrained(
13 "imhmdf/LydiaTM-SKL-32B",
14 trust_remote_code=True
15)
16
17tokenizer = AutoTokenizer.from_pretrained(
18 "imhmdf/LydiaTM-SKL-32B",
19 trust_remote_code=True
20)
21
22# Example usage for vision-language tasks
23def process_image_text(image, text_prompt):
24 inputs = processor(
25 text=text_prompt,
26 images=image,
27 return_tensors="pt"
28 )
29
30 with torch.no_grad():
31 outputs = model.generate(
32 **inputs,
33 max_length=512,
34 do_sample=True,
35 temperature=0.7
36 )
37
38 response = tokenizer.decode(outputs[0], skip_special_tokens=True)
39 return response@model{LydiaTM-SKL-32B,
title={LydiaTM-SKL-32B: Advanced Vision-Language Model for Specialized Knowledge Learning},
author={LydiaAI Team},
year={2026},
url={https://huggingface.co/imhmdf/LydiaTM-SKL-32B}
}