Skip to main content

Create your private AI model with no training data or GPUs 🤖🚀.

Project description

Artifex - Train small, private AI models without data

Artifex - Train small, private AI models without data

Documentation · Tutorial

Latest PyPi package version Tests status Sample Models on HuggingFace GitHub commit activity Artifex Documentation

📊 100% less training data needed • 💸 100% cheaper than third-party APIs • 🔒 Keep exclusive ownership of your models • 🌱 No GPU needed

🔥 Highlights

  • 📊 100% less training data needed: you don't need any training data at all, as synthetic data is generated under the hood.
  • 💸 100% cheaper than third-party APIs: Artifex allows you to generate your own production-ready models, so you can stop paying for third-party APIs.
  • 🔒 Keep ownership of your models: Tired of using third-party APIs? Artifex will generate the training data and model folder locally, so you can keep exclusive ownership of the models you generate.
  • 🌱 No GPU needed: Artifex is designed to run on a regular CPU, so you can train models and run inference with them on your laptop.
  • ⏳ Coming soon — Model Hosting: Unsure how to handle the generated models in production? Deploy your models as a private web service hosted on our servers, and perform inference through a simple REST API endpoint. Find out more and join the waitlist.

Introduction

Artifex is a Python library for generating a range of small AI models proprietary to you, without training data. How is it even possible, you might ask? Because synthetic training data is automatically generated under the hood through our Synthex library.

Use Cases

Artifex is perfect for you if you are looking to use a small AI model, but you:

  • Don't have enough training data: Artifex generates synthetic training data for you, so you don't need to worry about collecting or curating it.
  • Don't want to keep paying for third-party APIs: generate your own model you can use in production, so you can stop paying for third-party APIs.
  • Want to keep model ownership: generate models that are exclusively yours, so you can keep ownership of both the model and the data it was trained on.
  • Want to run training/inference on your own hardware: Artifex is designed to run both training and inference on a regular CPU, so you don't need a GPU to use it.

Available Models (more coming soon) — suggest one

We continue to add new models to Artifex, so stay tuned for updates! Currently, you can generate the following models:

  • 🛡️ Chatbot Guardrail: describe what your chatbot is not allowed to talk about; Artifex will automatically train a Guardrail model for you.
  • 🗂️ Intent Classifier: train a model to classify user intents into a set of categories of your choice, such as "product_inquiry", "send_email", "schedule_meeting" or anything else.
  • 📝 Got Suggestions? We highly value our users' opinions. If there is a specific model you'd like to see on Artifex, write it in the discussion!

🚀 Quickstart Guide

Install the library via pip

pip install artifex

🛡️ Guardrail Model — try the tutorial:

Train the model:

from artifex import Artifex

gr = Artifex().guardrail

gr.train(
    instructions=[
        "Soft medical advice is allowed, but it should be general and not specific to any individual.",
        "Anything that is about cosmetic products, including available products or their usage, is allowed.",
        "Anything else, including hard medical advice, is not allowed under any circumstances.",
    ]
)

once training is complete, perform inference:

# Hard medical advice, should be classified as unsafe
print(gr("Take 500mg of vitamin C daily to boost your immune system during cold season."))
# >>> "unsafe"

# Cosmetic product usage, should be classified as safe
print(gr("This facial scrub exfoliates the skin, removing dead skin cells."))
# >>> "safe"

🗂️ Intent Classifier Model — try the tutorial:

Train the model:

from artifex import Artifex

ic = Artifex().intent_classifier

ic.train(
    classes={
        "send_email": "Intent to send an email to someone",
        "reply_email": "Intent to reply to an email that was received",
        "schedule_meeting": "Intent to schedule a meeting with someone",
        "cancel_meeting": "Intent to cancel a meeting which was previously scheduled",
        "reschedule_meeting": "Intent to reschedule a meeting which was previously scheduled",
    }
)

once training is complete, perform inference:

print(ic("I forgot to send that email to John, could you do that for me?"))
# >>> "send_email"

print(ic("I need to set up a meeting with Sarah to discuss the upcoming delivery. Can you help me do that?"))
# >>> "schedule_meeting"

print(ic("I fell ill and I'll have to cancel my meeting with the team. Please go ahead and do it for me."))
# >>> "cancel_meeting"

print(ic("I fell ill and I'll have to postpone my meeting with the team. Please go ahead and do it for me."))
# >>> "reschedule_meeting"

⏳ Coming soon: model hosting — Join the waitlist!

We are working on a .deploy() method that will allow you to deploy your models as a private web service hosted on our servers, and perform inference through a simple REST API endpoint, so you can use your models in production without having to think about the underlying infrastructure.

See the example below:

from artifex import Artifex

gr = Artifex().guardrail

gr.train(
    instructions=[
        "Soft medical advice is allowed, but it should be general and not specific to any individual.",
        "Anything that is about cosmetic products, including available products or their usage, is allowed.",
        "Anything else, including hard medical advice, is not allowed under any circumstances.",
    ]
)

gr.deploy()

# >>> "Your service is now running on https://model.tanaos.com/hya13ki7"

Perform inference on the deployed model:

import requests

response = requests.post(
    "https://model.tanaos.com/hya13ki7",
    headers={"Authorization": "Bearer <your-token-here>"},
    json={"text": "Take 500mg of vitamin C daily to boost your immune system during cold season."}
)

print(response.json())

# >>> {"result": "unsafe"}

Want to join the waitlist to get early access? Click on the button below:

🔗 Tutorials & Demos

Guardrail Model

  1. Tutorial — create a Guardrail Model with Artifex
  2. Demo — try a Guardrail Model trained with Artifex
  3. HF page — see a Guardrail Model trained with Artifex

Intent Classifier Model

  1. Tutorial — create an Intent Classifier Model with Artifex

📚 Documentation & Support

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

artifex-0.2.0.tar.gz (914.1 kB view details)

Uploaded Source

Built Distribution

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

artifex-0.2.0-py3-none-any.whl (723.3 kB view details)

Uploaded Python 3

File details

Details for the file artifex-0.2.0.tar.gz.

File metadata

  • Download URL: artifex-0.2.0.tar.gz
  • Upload date:
  • Size: 914.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for artifex-0.2.0.tar.gz
Algorithm Hash digest
SHA256 52021e930f0d9b85cf09e3e5d29908e887499dc1c6161f51a7ce520c4fc41ad6
MD5 96d303b410c008cf6e13387dce5419a8
BLAKE2b-256 5b0695d90292633c2121e41aed7a9ca0d63928711d8d742a32a3233c54746b54

See more details on using hashes here.

File details

Details for the file artifex-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: artifex-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 723.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for artifex-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf52ff7edcf076c887debd239de559e8c67490a8f2c33e676bf9f2019c208934
MD5 d3d9341884a7cdf808508bda99122544
BLAKE2b-256 02a6cd693e0593d1ac8498839c87f1f9f971d201885fc56ad4ce1fd245f55fd5

See more details on using hashes here.

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