Run this model with HF Jobs

Run OS-Copilot/OS-Atlas-Base-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/OS-Copilot/OS-Atlas-Base-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/OS-Copilot/OS-Atlas-Base-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/OS-Copilot/OS-Atlas-Base-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/OS-Copilot/OS-Atlas-Base-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

while deploying the OS-Atlas-Base-7B Getting "ValueError: Unsupported model type qwen2_vl" Error

#6
by Saurabh-hiehq - opened

import boto3
import sagemaker
from sagemaker.huggingface import HuggingFaceModel, get_huggingface_llm_image_uri

Explicitly set the region

session = boto3.Session(aws_access_key_id="your id",
aws_secret_access_key="your key",
region_name="us-east-1") # Change region as needed
sagemaker_session = sagemaker.Session(boto_session=session)

Check the region explicitly

print(f"Region: {sagemaker_session.boto_session.region_name}")

Use this session in your Hugging Face deployment

role = "your role"
hub = {'HF_MODEL_ID': 'OS-Copilot/OS-Atlas-Base-7B', 'SM_NUM_GPUS': '1', 'TRUST_REMOTE_CODE': 'true'}

huggingface_model = sagemaker.huggingface.HuggingFaceModel(
role=role,
env=hub,
sagemaker_session=sagemaker_session,
image_uri = sagemaker.huggingface.get_huggingface_llm_image_uri(
backend="huggingface",
region="us-east-1", # Explicitly set the region here
version="2.3.1"))

try:
predictor = huggingface_model.deploy(
initial_instance_count=1,
instance_type="ml.g5.4xlarge",
container_startup_health_check_timeout=300,
)
response = predictor.predict({"inputs": "Hi, what can you help me with?"})
print("model_response::::",response)
except Exception as e:
print(f"Deployment failed: {e}")

print(predictor.predict({"inputs": "Hi, what can you help me with?"}))

########
Using above code to create inference endpoint but getting error

Sign up or log in to comment