Downloads · 30 days
11
9% of all-time downloads
tokyo-electron-device-ai/llama3-tedllm-8b-v0
llama3-tedllm-8b-v0 is a machine learning model from tokyo-electron-device-ai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as llama3.
Llama3-tedllm-8b-v0 is a bilingual Japanese-English generative model built through continuous pre-training from Llama-3-8B on approximately 173 billion tokens. This model is designed to enhance the Japanese language u…
Downloads · 30 days
11
9% of all-time downloads
All-time downloads
118
Public
Parameters
8.1B
32.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors32.5 GB · 100%
From the Hugging Face model README
Llama3-tedllm-8b-v0 is a bilingual Japanese-English generative model built through continuous pre-training from Llama-3-8B on approximately 173 billion tokens. This model is designed to enhance the Japanese language understanding and generation while preserving English proficiency of Llama-3.
Below is a sample code to use this model for text generation.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("tokyo-electron-device-ai/llama3-tedllm-8b-v0")
model = AutoModelForCausalLM.from_pretrained("tokyo-electron-device-ai/llama3-tedllm-8b-v0", device_map="auto", torch_dtype=torch.bfloat16)
text = "人工知能とは何か説明してください"
tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
tokenized_input,
max_new_tokens=50,
do_sample=True,
top_p=0.9,
temperature=0.6,
)[0]
print(tokenizer.decode(output))
We follow the approach described in Bilingual Adaptation of Monolingual Foundation Models for training.
This model was continuously trained on 173B tokens, with the training data consisting of 20% English and 80% Japanese. The raw Japanese data was filtered using scripts from llm-jp-corpus repository. The following Japanese datasets were included into the training data mixture:
Note: This released model was trained exclusively on open-source datasets. We also trained models using proprietary domain-specific data, but there are no plans to release those models.
Note: We created another model name, llama3-tedllm-8b-v0-annealing as the model with the annealing_step applied. If you are interested, please check here.
The model was trained on a Cerebras Wafer-Scale Cluster, using from 4 to 16 CS-3 systems during different phases of training. Training on the Cerebras Wafer-Scale Clusters leverages Cerebras' Weight Streaming execution paradigm, which simplifies the training of LLMs by disaggregating compute from memory used for model weights. This enables efficient scaling of training across multiple nodes using simple data parallelism. You can learn more about Cerebras Wafer-Scale clusters and Weight Streaming execution here.
We conducted a comprehensive evaluation of Llama3-tedllm-8b-v0-annealing and benchmarked it against other leading Japanese-English bilingual models. Considering evaluation results in both Japanese and English, our model performs on par with the best Japanese-English bilingual models of a similar size, while offering significantly higher tokenization efficiency, which leads to a substantial reduction in inference cost.
| Model | EL | FA | HE | MC | MR | NLI | QA | RC | AVG |
|---|---|---|---|---|---|---|---|---|---|
| Llama-3-8B | 0.372 | 0.254 | 0.505 | 0.647 | 0.650 | 0.634 | 0.413 | 0.868 | 0.543 |
| Llama3-tedllm-8b-v0 | 0.384 | 0.254 | 0.540 | 0.747 | 0.680 | 0.622 | 0.507 | 0.867 | 0.575 |
| Llama-3-Swallow-8B-v0.1 | 0.407 | 0.277 | 0.525 | 0.750 | 0.720 | 0.612 | 0.522 | 0.890 | 0.588 |
| Llama-3-ELYZA-JP-8B | 0.461 | 0.276 | 0.485 | 0.763 | 0.700 | 0.610 | 0.491 | 0.900 | 0.586 |
| Model | MMLU | BoolQ | Winogrande | Hellaswag | Average |
|---|---|---|---|---|---|
| Llama-3-8B | 0.622 | 0.812 | 0.728 | 0.792 | 0.738 |
| Llama3-tedllm-8b-v0 | 0.591 | 0.826 | 0.736 | 0.770 | 0.731 |
| Llama-3-Swallow-8B-v0.1 | 0.591 | 0.824 | 0.726 | 0.772 | 0.728 |
| Llama-3-ELYZA-JP-8B | 0.564 | 0.824 | 0.726 | 0.772 | 0.721 |
If you have any question, please feel free to contact [email protected].