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':'01-ai/Yi-34B',
'output_dir':'/opt/ml/model'
# add your remaining hyperparameters
# more info here https://github.com/huggingface/transformers/tree/v4.26.0/examples/pytorch/language-modeling
}
# git configuration to download our fine-tuning script
git_config = {'repo': 'https://github.com/huggingface/transformers.git','branch': 'v4.26.0'}
# creates Hugging Face estimator
huggingface_estimator = HuggingFace(
entry_point='run_clm.py',
source_dir='./examples/pytorch/language-modeling',
instance_type='ml.p3.2xlarge',
instance_count=1,
role=role,
git_config=git_config,
transformers_version='4.26.0',
pytorch_version='1.13.1',
py_version='py39',
hyperparameters = hyperparameters
)
# starting the train job
huggingface_estimator.fit()
The Advantages of Software Offshore Services for Your Business
Introduction It's no secret that the world of business is becoming increasingly interconnected. As technology continues to evolve, companies are finding new ways to leverage the power of software and digital solutions to stay ahead of the competition. One such strategy that has gained significant momentum in recent years is offshore software development. In this comprehensive article, we will explore the advantages of software offshore services for your business. From cost efficiency and access to top talent to enhanced flexibility and scalability, we will discuss how offshore services provide a competitive edge. We will also delve into the benefits of offloading non-core activities and the reduced time to market that can be achieved. By the end, you will have a clear understanding of why offshore services can be a game-changer for your business. Cost Efficiency In today's business landscape, cost efficiency is a top priority for organizations of all sizes. Offshore software de...
Comments
Post a Comment