Skip to main content

Using NAS such as huggingface hub

Project description

Huggingface NAS

Installation

pip3 install huggingface_nas

How to use

Huggingface to Synology NAS (Model)

from huggingface_nas import upload_model

upload_model(
    name="<huggingface model ex. meta-llama/Llama-3.3-70B-Instruct>",
    base_folder="<synology folder>",
    token="<huggingface token>",
    ip_address="<synology ip>",
    port="<synology port>",
    username="<synology username>",
    password="<synology password>"
)

Huggingface to Synology NAS (Dataset)

from huggingface_nas import upload_dataset

upload_dataset(
    name="<huggingface dataset ex. meta-llama/Llama-3.3-70B-Instruct-evals>",
    base_folder="<synology folder>",
    token="<huggingface token>",
    ip_address="<synology ip>",
    port="<synology port>",
    username="<synology username>",
    password="<synology password>"
)

Load dataset from Synology NAS

from huggingface_nas import load_dataset_nas

data = load_dataset_nas(
    path="<model path such as meta-llama/Llama-3.3-70B-Instruct-evals>",
    base_path="<share folder in synology NAS>",
    ip_address="<synology ip>",
    port="<synology port>",
    username="<synology username>",
    password="<synology password>"
)

Load Model from Synology NAS

from transformers import AutoModel
from huggingface_nas import prepare_model_from_nas

model_download_path = prepare_model_from_nas(
    path="<model path such as meta-llama/Llama-3.3-70B-Instruct>",
    base_path="<share folder in synology NAS>",
    ip_address="<synology ip>",
    port="<synology port>",
    username="<synology username>",
    password="<synology password>"
)
AutoModel.from_pretrained(model_download_path)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huggingface_nas-0.1.0.post1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huggingface_nas-0.1.0.post1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file huggingface_nas-0.1.0.post1.tar.gz.

File metadata

  • Download URL: huggingface_nas-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for huggingface_nas-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 8c8a857d7b3f6ccfdd1156f7055184cbba85d36b214daaf2c664810cc69235e6
MD5 2c319529eaf5539291f7eb6ac85b5341
BLAKE2b-256 511b59fa6e53a8ed80e19d83708d9b134b6f03cd4dcad3bfaa499a4ade0c9bec

See more details on using hashes here.

Provenance

The following attestation bundles were made for huggingface_nas-0.1.0.post1.tar.gz:

Publisher: publish.yaml on tony9402/huggingface-NAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file huggingface_nas-0.1.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for huggingface_nas-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 df1f0821ccdb1fa355eafb5e3e5e2762279f5d2c30439bcb56ae79e12d33d691
MD5 6653990651f83c6a44b0a1f7203b2c2c
BLAKE2b-256 5ea60f2f11b31d6d2597a194f3503e69dc6905497cb7b1ac0dbe040317435b2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for huggingface_nas-0.1.0.post1-py3-none-any.whl:

Publisher: publish.yaml on tony9402/huggingface-NAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page