YAM-AI-4B / README.md
adelwolf5's picture
Update README.md
e3d1769 verified
|
Raw History Blame Contribute Delete
1.54 kB
---
base_model: google/gemma-4-E4B-it
library_name: transformers
pipeline_tag: text-generation
tags:
- gemma4
- transformers
- lora
- multilingual
- yam-ai
---
# YAM AI 4B 🤖🌍
YAM AI 4B is a multilingual assistant based on **google/gemma-4-E4B-it**.
## About
- Base model: `google/gemma-4-E4B-it`
- Fine-tuned with LoRA
- LoRA merged into the base model
- Multilingual identity training across 80 languages
- Tested successfully in French, English, German, Arabic, Spanish, Italian, Russian, Japanese, Chinese, Korean and Kabyle
## Identity
**User**
```text
Who are you?
```
**YAM AI 4B**
```text
I am YAM AI, an intelligent assistant.
```
## Usage
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "adelwolf5/YAM-AI-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{"role": "user", "content": "Who are you?"}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(
prompt,
return_tensors="pt",
add_special_tokens=False
).to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=80
)
new_tokens = outputs[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
```
## Base model
YAM AI 4B is a derivative model based on **Gemma 4 by Google**.
It was not trained from scratch.