File size: 1,297 Bytes
0af40ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
---
license: apache-2.0
datasets:
- HuggingFaceFW/fineweb-2
language:
- ru
metrics:
- character
base_model:
- meta-llama/Llama-3.3-70B-Instruct
new_version: meta-llama/Llama-3.3-70B-Instruct
pipeline_tag: translation
library_name: adapter-transformers
---
import sagemaker
import boto3
from sagemaker.huggingface import HuggingFace
try:
role = sagemaker.get_execution_role()
except ValueError:
iam = boto3.client('iam')
role = iam.get_role(RoleName='sagemaker_execution_role')['Role']['Arn']
hyperparameters = {
'model_name_or_path':'issai/LLama-3.1-KazLLM-1.0-8B',
'output_dir':'/opt/ml/model'
# add your remaining hyperparameters
# more info here https://github.com/huggingface/transformers/tree/v4.37.0/examples/pytorch/seq2seq
}
# git configuration to download our fine-tuning script
git_config = {'repo': 'https://github.com/huggingface/transformers.git','branch': 'v4.37.0'}
# creates Hugging Face estimator
huggingface_estimator = HuggingFace(
entry_point='run_translation.py',
source_dir='./examples/pytorch/seq2seq',
instance_type='ml.p3.2xlarge',
instance_count=1,
role=role,
git_config=git_config,
transformers_version='4.37.0',
pytorch_version='2.1.0',
py_version='py310',
hyperparameters = hyperparameters
)
# starting the train job
huggingface_estimator.fit() |