Views
No views yet
google/gemma-4-E4B-itShenLab/MentalChat16K — ~16K counselor-style conversational turns combining synthetic data and anonymized interview transcripts.1from transformers import AutoProcessor, AutoModelForImageTextToText
2import torch
3
4model_id = "howardbaik/gemma-4-E4B-it-mentalchat16k"
5processor = AutoProcessor.from_pretrained(model_id)
6model = AutoModelForImageTextToText.from_pretrained(
7 model_id, torch_dtype=torch.bfloat16, device_map="auto"
8)
9
10messages = [
11 {"role": "user", "content": [{"type": "text", "text": "I've been feeling overwhelmed at work lately."}]},
12]
13inputs = processor.apply_chat_template(
14 messages, add_generation_prompt=True, tokenize=True,
15 return_dict=True, return_tensors="pt"
16).to(model.device)
17
18outputs = model.generate(**inputs, max_new_tokens=256)
19print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))SFTTrainer with SFTConfiguse_reentrant=False)adamw_torch_fusedskip_prepare_dataset=True, remove_unused_columns=False)1@misc{gemma4,
2 title = {Gemma 4},
3 author = {{Google DeepMind}},
4 year = {2026},
5 url = {https://huggingface.co/google/gemma-4-E4B-it}
6}
7
8@dataset{mentalchat16k,
9 title = {MentalChat16K},
10 author = {Shen Lab},
11 url = {https://huggingface.co/datasets/ShenLab/MentalChat16K}
12}