While following through our tutorials, you might have had questions regarding the details of the requirements and specifications. We have listed out the frequently asked questions as a separate document. Please refer to the relevant information below:

Format Requirements

General requirements for a model

  • A model should be in safetensors format.
  • The model should NOT be nested inside another directory.
  • Including other arbitrary files (that are not in the list) is totally fine. However, those files will not be downloaded nor used.
RequiredFilenameDescription
YessafetensorsModel weight, e.g. model.safetensors. Use model.safetensors.index.json for split safetensors files
Yesconfig.jsonModel config that includes the architecture. (Supported Models on Friendli)
Notokenizer.jsonTokenizer for the model
Notokenizer_config.jsonTokenizer config. This should be present & have a chat_template field for the Friendli Engine to provide chat APIs
Nospecial_tokens_map.json

General requirements for a dataset

The dataset should satisfy the following conditions:
  1. The dataset must contain a column named “messages”.
  2. Each row in the “messages” column should be compatible with the chat template of the base model. For example, tokenizer_config.json of mistralai/Mistral-7B-Instruct-v0.2 is a template that repeats the messages of a user and an assistant. Concretely, each row in the “messages” field should follow a format like: [{"role": "user", "content": "The 1st user's message"}, {"role": "assistant", "content": "The 1st assistant's message"}]. In this case, HuggingFaceH4/ultrachat_200k is a dataset that is compatible with the chat template.

3rd-party account integration

Personal settings

How to integrate a Hugging Face account

If you revoke / invalidate the key, you will have to update the key in order to not disrupt ongoing deployments, or to launch a new inference deployment.

How to integrate a W&B account

If you revoke / invalidate the key, you will have to update the key in order to not disrupt ongoing deployments, or to launch a new inference deployment.

Extra: How to upload a safetensors format model to W&B using W&B CLI

wandb artifact put -n project/artifact_id --type model /path/to/dir
  • With all this, the W&B artifact will look like this:
W&B artifact

Using 3rd-party model

How to use a W&B artifact as a model

W&B artifact as a model
  • Use the full name of the artifact
  • The artifact name must be in the format of: org/project/artifact_id:version

How to use a Hugging Face repository as a model

HF artifact as a model
  • Use the repository id of the model. You may select the entry from the list of autocompleted model repositories.
  • You may choose specific branch, or manually enter a commit hash.

Troubleshooting

Can’t access the artifact

Troubleshooting - can't access
  • The artifact might be nonexistent, or hidden so that you cannot access it.

You don’t have access to this gated model

Troubleshooting - no access
  • The repository is gated. Please follow the steps and gain approval from the owner using Hugging Face Hub.

The repository / artifact is invalid

Troubleshooting - invalid repo Troubleshooting - invalid artifact
  • The model does not meet the requirements. Please check if the model follows a correct safetensors format.

The architecture is not supported

Troubleshooting - unsupported