Deployment Specification¶
This page provides detailed requirements for deploying SciFMs with Nomad.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC-2119][].
Model Code and Dependencies¶
Model/server implementation code SHALL live in a separate Python package repository.
The package SHALL be pip installable
The package SHOULD specify dependencies using a
pyproject.tomlfile.
External model/server packages SHOULD be pinned.
Model-specific dependencies SHOULD NOT be added to the root project.
Model and tool code SHALL NOT write to stdout; use Python logging.
The Model’s’
TorchModuleTool.from_pretrainedSHALL do the following:Accept an input signature of
from_pretrained(name_or_path: str)wherename_or_pathis an absolute path to a model directory.Return a fully initialized model on
nomad.fm_base_tool.default_device()Return independent instances of
nomad.fm_base_tool.TorchModuleToolon each invocation.
Instances of
nomad.fm_base_tool.TorchModuleToolSHALL only use the accelerator indicated byTorchModuleTool.device; multi-accelerator execution within one tool instance is not permitted.
Model Configuration¶
External model sources are preferred.
name_or_pathSHOULD point to an external source such as Hugging Face, ORAS, or a Git/Git LFS repository.If local model directories are used, names SHALL satisfy MCP tool naming constraints.
If local model directories are used, each weight revision SHALL use a distinct directory name.
Local model directories SHALL include a model card aligned to container/model-card.md.
A SEP-986
tool_nameSHOULD be provided ifname_or_pathdoes not satisfy SEP-986.
Runtime policy¶
Tools SHALL NOT write persistent files.
Temporary files MUST be invocation-scoped and use the
tempfilemodule.Entries under
fmod_modelsMUST beTorchModuleToolimplementations.Entries under
tools(non-fmod_models) SHALL be CPU-only.A single
TorchModuleToolinstance SHALL use onlyTorchModuleTool.device; multi-GPU execution within one tool instance is not permitted.