{"id":21428304,"url":"https://github.com/mlverse/safetensors","last_synced_at":"2025-07-06T10:02:56.469Z","repository":{"id":170980337,"uuid":"647274393","full_name":"mlverse/safetensors","owner":"mlverse","description":"Safetensors File Format","archived":false,"fork":false,"pushed_at":"2024-09-17T14:28:09.000Z","size":1227,"stargazers_count":9,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T06:51:16.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mlverse.github.io/safetensors/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlverse.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T12:35:48.000Z","updated_at":"2025-03-08T16:24:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2291cc3-5504-44f7-893c-6f2aeb783702","html_url":"https://github.com/mlverse/safetensors","commit_stats":null,"previous_names":["mlverse/safetensors"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mlverse/safetensors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fsafetensors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fsafetensors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fsafetensors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fsafetensors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlverse","download_url":"https://codeload.github.com/mlverse/safetensors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fsafetensors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263882258,"owners_count":23524458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T22:12:36.187Z","updated_at":"2025-07-06T10:02:56.449Z","avatar_url":"https://github.com/mlverse.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# safetensors\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/mlverse/safetensors/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mlverse/safetensors/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nsafetensors is a pure R implementation of the [safetensors](https://github.com/huggingface/safetensors) file format.\n\nCurrently only reading files is supported.\n\n## Installation\n\nsafetensors can be installed from CRAN with:\n\n``` r\ninstall.packages(\"safetensors\")\n```\n\nThe development version of safetensors from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"mlverse/safetensors\")\n```\n\n## Example\n\nHere's an example of writing and reading safetensors files:\n\n```{r}\nlibrary(torch)\nlibrary(safetensors)\n\ntensors \u003c- list(\n  x = torch_randn(10, 10),\n  y = torch_ones(10, 10)\n)\n\nstr(tensors)\n\ntmp \u003c- tempfile()\nsafe_save_file(tensors, tmp)\n\ntensors \u003c- safe_load_file(tmp)\nstr(tensors)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlverse%2Fsafetensors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlverse%2Fsafetensors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlverse%2Fsafetensors/lists"}