Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.
This page is the configuration reference for Friendli Container—how to pass launch options, serve across multiple GPUs, and tune serving for your model. If you haven’t run a container yet, start with the QuickStart.Friendli Container supports direct loading of safetensors checkpoints—compatible with Hugging Face transformers—for many model types. You can find the complete list of supported models on the Supported Models page. If your model is not on the list, contact support.
Pass launch options as arguments after the image name in your docker run command:
# Fill the values of following variables.export HF_MODEL_NAME="" # Hugging Face model name (e.g., "meta-llama/Meta-Llama-3-8B-Instruct")export FRIENDLI_CONTAINER_SECRET="" # Friendli container secretdocker run --gpus '"device=0"' -p 8000:8000 \ -e FRIENDLI_CONTAINER_SECRET=$FRIENDLI_CONTAINER_SECRET \ -v ~/.cache/huggingface:/root/.cache/huggingface \ registry.friendli.ai/trial \ --hf-model-name $HF_MODEL_NAME \ [LAUNCH_OPTIONS]
Replace [LAUNCH_OPTIONS] with the options described in Launch Options. Running the command above starts a Docker container that exposes an HTTP endpoint for handling inference requests.
Use tensor parallelism when serving large models that exceed the memory capacity of a single GPU. It distributes parts of the model’s weights across multiple GPUs. To use tensor parallelism with Friendli Container:
Specify multiple GPUs for $GPU_ENUMERATION (e.g., ‘“device=0,1,2,3”’).
Use the --num-devices (or -d) option to specify the tensor parallelism degree (e.g., --num-devices 4).
export FRIENDLI_CONTAINER_SECRET="" # Friendli container secret (leave it if it's already set in your environment)export HF_TOKEN="" # Access token from Hugging Face (see the caution below)docker run -p 8000:8000 --gpus '"device=0"' \ -e HF_TOKEN=$HF_TOKEN \ -e FRIENDLI_CONTAINER_SECRET=$FRIENDLI_CONTAINER_SECRET \ -v ~/.cache/huggingface:/root/.cache/huggingface \ registry.friendli.ai/trial \ --hf-model-name meta-llama/Llama-3.1-8B-Instruct
Since downloading meta-llama/Llama-3.1-8B-Instruct is allowed only for authorized users, you need to provide your Hugging Face User Access Token through the HF_TOKEN environment variable. It works the same for all private repositories.
export FRIENDLI_CONTAINER_SECRET="" # Friendli container secret (leave it if it's already set in your environment)export HF_TOKEN="" # Access token from Hugging Face (see the caution below)docker run -p 8000:8000 \ --ipc=host --gpus '"device=0,1"' \ -e HF_TOKEN=$HF_TOKEN \ -e FRIENDLI_CONTAINER_SECRET=$FRIENDLI_CONTAINER_SECRET \ -v ~/.cache/huggingface:/root/.cache/huggingface \ registry.friendli.ai/trial \ --hf-model-name meta-llama/Llama-3.1-70B-Instruct \ --num-devices 2
Since downloading meta-llama/Llama-3.1-70B-Instruct is allowed only for authorized users, you need to provide your Hugging Face User Access Token through the HF_TOKEN environment variable. It works the same for all private repositories.
Friendli Container supports online quantization, which quantizes a model instantly when you launch it, as well as serving pre-quantized models. If your model is already quantized or needs to be quantized, check Quantization for more details.
Running MoE (Mixture of Experts) models requires an additional step to search the execution policy. See Serving MoE Models to learn how to launch Friendli Container for the MoE model.
Model name hosted on the Hugging Face Models Hub or a path to a local directory containing a model. When a model name is provided, Friendli Container first checks if the model is already cached at ~/.cache/huggingface/hub and uses it if available. If not, it will download the model from the Hugging Face Models Hub before launching the container. When a local path is provided, it will load the model from the location without downloading. This option is only available for models in a safetensors format.
-
❌
--tokenizer-file-path
TEXT
Absolute path of tokenizer file. This option is not needed when tokenizer.json is located under the path specified at --ckpt-path.
-
❌
--tokenizer-add-special-tokens
BOOLEAN
Whether or not to add special tokens in tokenization. Equivalent to Hugging Face Tokenizer’s add_special_tokens argument. The default value is false for versions < v1.6.0.
true
❌
--tokenizer-skip-special-tokens
BOOLEAN
Whether or not to remove special tokens in detokenization. Equivalent to Hugging Face Tokenizer’s skip_special_tokens argument.
true
❌
--dtype
CHOICE: [bf16, fp16, fp32]
Data type of weights and activations. Choose one of <fp16|bf16|fp32>. This argument applies to non-quantized weights and activations. If not specified, Friendli Container follows the value of torch_dtype in config.json file or assumes fp16.
fp16
❌
--bad-stop-file-path
TEXT
JSON file path that contains stop sequences or bad words/tokens.
-
❌
--num-request-threads
INT
Thread pool size for handling HTTP requests.
4
❌
--timeout-microseconds
INT
Server-side timeout for client requests, in microseconds.
0 (no timeout)
❌
--ignore-nan-error
BOOLEAN
If set to True, ignore NaN error. Otherwise, respond with a 400 status code if NaN values are detected while processing a request.
-
❌
--max-batch-size
INT
Max number of sequences that can be processed in a batch.
384
❌
--num-devices, -d
INT
Number of devices to use as the tensor parallelism degree.
1
❌
--search-policy
BOOLEAN
Searches for the best engine policy for the given combination of model, hardware, and parallelism degree. Learn more about policy search at Optimizing Inference with Policy Search.
false
❌
--terminate-after-search
BOOLEAN
Terminates engine container after the policy search.
false
❌
--algo-policy-dir
TEXT
Path to directory containing the policy file. The default value is the current working directory. Learn more about policy search at Optimizing Inference with Policy Search.
current working dir
❌
--adapter-model
TEXT
Add an adapter model with adapter name and path; <adapter_name>:<adapter_ckpt_path>. The path can be a name from a Hugging Face model hub.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"FriendliAI Docs","description":"Let your team focus on building great AI products. FriendliAI will make sure your AI runs fast, affordable, and reliable at scale. Leave the hassle of AI inference to FriendliAI.","colors":{"primary":"#2A62DB","light":"#4f87ff","dark":"#1e469b"},"logo":{"light":"https://mintcdn.com/friendliai/Xn-EfFlXFvptInk9/static/svgs/logo.svg?fit=max\u0026auto=format\u0026n=Xn-EfFlXFvptInk9\u0026q=85\u0026s=0a04a5dd2152a1258e6d3ce995b70eb0","dark":"https://mintcdn.com/friendliai/OmGyXdVnt91Gfn8z/static/svgs/logo-dark.svg?fit=max\u0026auto=format\u0026n=OmGyXdVnt91Gfn8z\u0026q=85\u0026s=7bc2b761b9c8da66973a9869b7de4f90"},"favicon":"https://mintcdn.com/friendliai/Xn-EfFlXFvptInk9/static/svgs/favicon.svg?fit=max\u0026auto=format\u0026n=Xn-EfFlXFvptInk9\u0026q=85\u0026s=d425e1903adeb917593a54eb3d20c66b","api":{"openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml","params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true,"autogenerate":true}},"background":{"color":{"light":"#FFFFFF","dark":"#0A101A"}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://friendli.ai/get-started/dedicated-endpoints"}},"footer":{"socials":{"website":"https://friendli.ai","linkedin":"https://www.linkedin.com/company/friendliai","youtube":"https://www.youtube.com/@friendliai","github":"https://github.com/friendliai","discord":"https://discord.gg/g53ByexhR","x":"https://x.com/friendliai","medium":"https://medium.com/friendliai","facebook":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","slack":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","instagram":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","hacker-news":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","telegram":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","twitter":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","x-twitter":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","earth-americas":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","bluesky":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","threads":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","reddit":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css","podcast":"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css"}},"search":{"prompt":"Search FriendliAI Docs..."},"seo":{"metatags":{"og:site_name":"FriendliAI Docs","twitter:card":"summary_large_image"}},"integrations":{"gtm":{"tagId":"GTM-MVXVF29V"},"telemetry":{"enabled":true}},"banner":{"content":"Try [GLM-5.3](https://friendli.ai/models/zai-org/GLM-5.3) and [GLM-5.3-Flash](https://friendli.ai/models/zai-org/GLM-5.3-Flash) today. To learn more, see the [FriendliAI Blog](https://friendli.ai/blog)."},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"home","href":"https://friendli.ai"},{"anchor":"Models","icon":"brain","href":"https://friendli.ai/models"},{"anchor":"Pricing","icon":"tag","href":"https://friendli.ai/pricing"},{"anchor":"Blog","icon":"newspaper","href":"https://friendli.ai/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"friendliai","hasAudioNarration":false,"actualSubdomain":"friendliai","customDomains":["friendli.ai"],"gitSource":{"type":"github","owner":"friendliai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae42528d9294bdce1b3132c","collectionId":"3a7c9ae7-5685-4c83-83e1-3f8076e4a0b5","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae42528d9294bdce1b3132c"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae42528d9294bdce1b3132c","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Guides","count":44},{"language":"default","tag":"Examples","count":40},{"language":"default","tag":"Reference","count":36},{"language":"default","tag":"Inference","count":30},{"language":"default","tag":"Archive","count":24},{"language":"default","tag":"Dedicated","count":24},{"language":"default","tag":"Friendli Container","count":23},{"language":"default","tag":"Agents","count":14},{"language":"default","tag":"Friendli Dedicated Endpoints","count":12},{"language":"default","tag":"API Reference","count":12}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"support@friendli.ai","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3yQ6H-1_WfwkMZI_qYPLs1a-t7PU0AbeE9KK5Z5ClqOw.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3yQ6H-1_WfwkMZI_qYPLs1a-t7PU0AbeE9KK5Q5ClqOw.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3yQ6H-1_WfwkMZI_qYPLs1a-t7PU0AbeE9KK7uxQxXAuk.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3yQ6H-1_WfwkMZI_qYPLs1a-t7PU0AbeE9KK5b5ClqOw.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3yQ6H-1_WfwkMZI_qYPLs1a-t7PU0AbeE9KK5a5ClqOw.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3yQ6H-1_WfwkMZI_qYPLs1a-t7PU0AbeE9KK5U5Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n@font-face{font-family:\"Saans-Light\";src:url(https://docs-assets.friendli.ai/fonts/Saans-Light.woff2) format(\"woff2\"),url(https://docs-assets.friendli.ai/fonts/Saans-Light.woff) format(\"woff\");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:\"Saans-Regular\";src:url(https://docs-assets.friendli.ai/fonts/Saans-Regular.woff2) format(\"woff2\"),url(https://docs-assets.friendli.ai/fonts/Saans-Regular.woff) format(\"woff\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"Saans-Medium\";src:url(https://docs-assets.friendli.ai/fonts/Saans-Medium.woff2) format(\"woff2\"),url(https://docs-assets.friendli.ai/fonts/Saans-Medium.woff) format(\"woff\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"Saans-SemiBold\";src:url(https://docs-assets.friendli.ai/fonts/Saans-SemiBold.woff2) format(\"woff2\"),url(https://docs-assets.friendli.ai/fonts/Saans-SemiBold.woff) format(\"woff\");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:\"Saans-Bold\";src:url(https://docs-assets.friendli.ai/fonts/Saans-Bold.woff2) format(\"woff2\"),url(https://docs-assets.friendli.ai/fonts/Saans-Bold.woff) format(\"woff\");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:\"Saans-Heavy\";src:url(https://docs-assets.friendli.ai/fonts/Saans-Heavy.woff2) format(\"woff2\"),url(https://docs-assets.friendli.ai/fonts/Saans-Heavy.woff) format(\"woff\");font-weight:800;font-style:normal;font-display:swap}:root{--gray-300:159 179 200;--primary-accent:#0095ff}.border-gray-100{border-color:#d9e2ec}body{font-family:\"Saans-Regular\",sans-serif}.tracking-tighter{letter-spacing:-.04em}.tracking-normal,.tracking-tight,.tracking-wide,body{letter-spacing:.01em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.prose :where(h1, h2, h3):not(:where([class~=\"not-prose\"], [class~=\"not-prose\"] *)){letter-spacing:0}.font-medium:not(.font-mono):not(.font-mono *),.mint-font-medium:not(.font-mono):not(.font-mono *){font-family:\"Saans-Medium\",sans-serif}.font-semibold:not(.font-mono):not(.font-mono *),.mint-font-semibold:not(.font-mono):not(.font-mono *),.prose :where(a):not(:where([class~=\"not-prose\"], [class~=\"not-prose\"] *)):not(.font-mono):not(.font-mono *),h1:not(.font-mono):not(.font-mono *),h2:not(.font-mono):not(.font-mono *),h3:not(.font-mono):not(.font-mono *),h4:not(.font-mono):not(.font-mono *),h5:not(.font-mono):not(.font-mono *),strong:not(.font-mono):not(.font-mono *){font-family:\"Saans-SemiBold\",sans-serif}.prose :is(p, li, td, dd) svg.icon{vertical-align:-.025em!important}.prose :is(p, li, td, dd) a[href^=http]:not([href*=\"friendli.ai\"]):not(:has(img))::after{content:\"\";display:inline-block;width:.7em;height:.7em;margin-left:.2em;vertical-align:-.05em;background-color:currentColor;-webkit-mask:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20d%3D%22M320%200c-17.7%200-32%2014.3-32%2032s14.3%2032%2032%2032l82.7%200-201.4%20201.4c-12.5%2012.5-12.5%2032.8%200%2045.3s32.8%2012.5%2045.3%200L448%20109.3%20448%20192c0%2017.7%2014.3%2032%2032%2032s32-14.3%2032-32l0-160c0-17.7-14.3-32-32-32L320%200zM80%2096C35.8%2096%200%20131.8%200%20176L0%20432c0%2044.2%2035.8%2080%2080%2080l256%200c44.2%200%2080-35.8%2080-80l0-80c0-17.7-14.3-32-32-32s-32%2014.3-32%2032l0%2080c0%208.8-7.2%2016-16%2016L80%20448c-8.8%200-16-7.2-16-16l0-256c0-8.8%207.2-16%2016-16l80%200c17.7%200%2032-14.3%2032-32s-14.3-32-32-32L80%2096z%22%2F%3E%3C%2Fsvg%3E) no-repeat center/contain;mask:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20d%3D%22M320%200c-17.7%200-32%2014.3-32%2032s14.3%2032%2032%2032l82.7%200-201.4%20201.4c-12.5%2012.5-12.5%2032.8%200%2045.3s32.8%2012.5%2045.3%200L448%20109.3%20448%20192c0%2017.7%2014.3%2032%2032%2032s32-14.3%2032-32l0-160c0-17.7-14.3-32-32-32L320%200zM80%2096C35.8%2096%200%20131.8%200%20176L0%20432c0%2044.2%2035.8%2080%2080%2080l256%200c44.2%200%2080-35.8%2080-80l0-80c0-17.7-14.3-32-32-32s-32%2014.3-32%2032l0%2080c0%208.8-7.2%2016-16%2016L80%20448c-8.8%200-16-7.2-16-16l0-256c0-8.8%207.2-16%2016-16l80%200c17.7%200%2032-14.3%2032-32s-14.3-32-32-32L80%2096z%22%2F%3E%3C%2Fsvg%3E) no-repeat center/contain}.font-mono,code:not(.font-mono *),kbd,pre{font-family:\"Geist Mono\",ui-monospace,SFMono-Regular,Menlo,Monaco,monospace}#banner{background-color:var(--primary-accent);font-size:16px;box-shadow:none}#banner>div{margin-top:.625rem;margin-bottom:.625rem}#topbar-cta-button,#topbar-cta-button .bg-primary-dark,#topbar-cta-button a,#topbar-cta-button.bg-primary-dark{background-color:#2a62db!important;color:#fff!important;border:0!important;border-radius:6px;box-shadow:none!important}#topbar-cta-button .bg-primary-dark:hover,#topbar-cta-button a:hover,#topbar-cta-button a:hover .bg-primary-dark,#topbar-cta-button.bg-primary-dark:hover,#topbar-cta-button:hover,#topbar-cta-button:hover .bg-primary-dark,#topbar-cta-button:hover a{background-color:#1a4ec4!important}#topbar-cta-button>.font-medium,#topbar-cta-button>.mint-font-medium{font-family:\"Saans-Medium\",sans-serif}#header>div:not(:first-child){display:none}.card>div>div:last-child>div{margin-top:.5rem}.card [data-component-part=card-content]{font-family:\"Saans-Regular\",sans-serif}.card-group.columns{gap:1rem}.rounded-border-box{padding:28px 44px;border:1px solid #d9e2ec;border-radius:8px;overflow:hidden}.dark .rounded-border-box{border:1px solid #243b53}.dark .rounded-border-box img{border:1px solid #212832}html[data-current-path=\"/\"] .nav-tabs-item[data-active]{text-shadow:none}html[data-current-path=\"/\"] #content-container{max-width:none;padding-inline:1rem}#footer [href=\"https://friendli.ai/?unused-social-placeholder-required-by-zod-4-hidden-by-css\"],html[data-current-path=\"/\"] #header,html[data-current-path=\"/\"] .nav-tabs-item[data-active]>div{display:none}html[data-current-path=\"/\"] #content{margin-top:0}"}],"page":{"pagePath":"archive/container/guides/configuration","slug":"/archive/container/guides/configuration","pageMetadata":{"title":"Configuration","sidebarTitle":"Configuration","description":"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.","og:description":"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.","href":"/archive/container/guides/configuration"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This page is the configuration reference for Friendli Container—how to pass launch options, serve across multiple GPUs, and tune serving for your model. If you haven’t run a container yet, start with the `,_jsx(_components.a,{href:`/archive/container/guides/quickstart`,children:`QuickStart`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Friendli Container supports direct loading of `,_jsx(_components.a,{href:`https://huggingface.co/docs/safetensors/index`,children:_jsx(_components.code,{children:`safetensors`})}),` checkpoints—compatible with `,_jsx(_components.a,{href:`https://huggingface.co/docs/transformers`,children:`Hugging Face transformers`}),`—for many model types. You can find the complete list of supported models on the `,_jsx(_components.a,{href:`https://friendli.ai/models?products=CONTAINER`,children:`Supported Models page`}),`. If your model is not on the list, `,_jsx(_components.a,{href:`mailto:support@friendli.ai`,children:`contact support`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`passing-launch-options`,children:`Passing Launch Options`}),`\n`,_jsxs(_components.p,{children:[`Pass launch options as arguments after the image name in your `,_jsx(_components.code,{children:`docker run`}),` command:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Fill the values of following variables.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HF_MODEL_NAME`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Hugging Face model name (e.g., \"meta-llama/Meta-Llama-3-8B-Instruct\")`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FRIENDLI_CONTAINER_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Friendli container secret`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --gpus`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\"device=0\"'`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 8000:8000`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` FRIENDLI_CONTAINER_SECRET=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FRIENDLI_CONTAINER_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.cache/huggingface:/root/.cache/huggingface`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` registry.friendli.ai/trial`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --hf-model-name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $HF_MODEL_NAME`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [LAUNCH_OPTIONS]`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`[LAUNCH_OPTIONS]`}),` with the options described in `,_jsx(_components.a,{href:`#launch-options`,children:`Launch Options`}),`. Running the command above starts a Docker container that exposes an HTTP endpoint for handling inference requests.`]}),`\n`,_jsx(Heading,{level:`2`,id:`multi-gpu-serving`,children:`Multi-GPU Serving`}),`\n`,_jsxs(_components.p,{children:[`Friendli Container supports `,_jsx(_components.em,{children:_jsx(_components.strong,{children:`tensor parallelism`})}),` and `,_jsx(_components.em,{children:_jsx(_components.strong,{children:`pipeline parallelism`})}),` for multi-GPU inference.`]}),`\n`,_jsx(Heading,{level:`3`,id:`tensor-parallelism`,children:`Tensor Parallelism`}),`\n`,_jsx(_components.p,{children:`Use tensor parallelism when serving large models that exceed the memory capacity of a single GPU. It distributes parts of the model’s weights across multiple GPUs. To use tensor parallelism with Friendli Container:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Specify multiple GPUs for `,_jsx(_components.code,{children:`$GPU_ENUMERATION`}),` (e.g., ‘“device=0,1,2,3”’).`]}),`\n`,_jsxs(_components.li,{children:[`Use the `,_jsx(_components.code,{children:`--num-devices`}),` (or `,_jsx(_components.code,{children:`-d`}),`) option to specify the tensor parallelism degree (e.g., `,_jsx(_components.code,{children:`--num-devices 4`}),`).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`examples`,children:`Examples`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Deploying Models on a Single GPU`,id:`deploying-models-on-a-single-gpu`,children:[_jsxs(_components.p,{children:[`This is an example running `,_jsx(_components.a,{href:`https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct`,children:`Llama-3.1-8B-Instruct`}),` with a single GPU.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FRIENDLI_CONTAINER_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Friendli container secret (leave it if it's already set in your environment)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HF_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Access token from Hugging Face (see the caution below)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 8000:8000`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --gpus`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\"device=0\"'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` HF_TOKEN=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HF_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` FRIENDLI_CONTAINER_SECRET=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FRIENDLI_CONTAINER_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.cache/huggingface:/root/.cache/huggingface`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` registry.friendli.ai/trial`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --hf-model-name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` meta-llama/Llama-3.1-8B-Instruct`})]}),`\n`]})})}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Since downloading `,_jsx(_components.code,{children:`meta-llama/Llama-3.1-8B-Instruct`}),` is allowed only for authorized users, you need to provide your `,_jsx(_components.a,{href:`https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hftoken`,children:`Hugging Face User Access Token`}),` through the `,_jsx(_components.code,{children:`HF_TOKEN`}),` environment variable. It works the same for all private repositories.`]})})]}),_jsxs(Tab,{title:`Deploying Models on Multi-GPU`,id:`deploying-models-on-multi-gpu`,children:[_jsxs(_components.p,{children:[`This is an example running `,_jsx(_components.a,{href:`https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct`,children:`Llama-3.1-70B-Instruct`}),` with a multi-GPU setup.`]}),_jsx(CodeBlock,{filename:``,highlight:`[5,11]`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FRIENDLI_CONTAINER_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Friendli container secret (leave it if it's already set in your environment)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HF_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Access token from Hugging Face (see the caution below)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 8000:8000`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --ipc=host`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --gpus`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\"device=0,1\"'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` HF_TOKEN=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HF_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` FRIENDLI_CONTAINER_SECRET=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FRIENDLI_CONTAINER_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.cache/huggingface:/root/.cache/huggingface`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` registry.friendli.ai/trial`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --hf-model-name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` meta-llama/Llama-3.1-70B-Instruct`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --num-devices`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`})]}),`\n`]})})}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Since downloading `,_jsx(_components.code,{children:`meta-llama/Llama-3.1-70B-Instruct`}),` is allowed only for authorized users, you need to provide your `,_jsx(_components.a,{href:`https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hftoken`,children:`Hugging Face User Access Token`}),` through the `,_jsx(_components.code,{children:`HF_TOKEN`}),` environment variable. It works the same for all private repositories.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`quantization`,children:`Quantization`}),`\n`,_jsxs(_components.p,{children:[`Friendli Container supports `,_jsx(_components.strong,{children:`online quantization`}),`, which quantizes a model instantly when you launch it, as well as serving pre-quantized models. If your model is already quantized or needs to be quantized, check `,_jsx(_components.a,{href:`/archive/container/guides/quantization`,children:`Quantization`}),` for more details.`]}),`\n`,_jsx(Heading,{level:`2`,id:`serving-moe-models`,children:`Serving MoE Models`}),`\n`,_jsxs(_components.p,{children:[`Running MoE (Mixture of Experts) models requires an additional step to search the execution policy. See `,_jsx(_components.a,{href:`/archive/container/guides/serving-moe-models`,children:`Serving MoE Models`}),` to learn how to launch Friendli Container for the MoE model.`]}),`\n`,_jsx(Heading,{level:`2`,id:`options-for-running-friendli-container`,children:`Options for Running Friendli Container`}),`\n`,_jsx(Heading,{level:`3`,id:`general-options`,children:`General Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Options`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Summary`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--version`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`Print Friendli Container version.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--help`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`Print Friendli Container help message.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`launch-options`,children:`Launch Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Options`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Summary`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--web-server-port`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Web server port.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`8000`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--metrics-port`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Prometheus metrics export port.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`8281`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--hf-model-name`})}),_jsx(_components.td,{children:`TEXT`}),_jsx(_components.td,{children:`Model name hosted on the Hugging Face Models Hub or a path to a local directory containing a model. When a model name is provided, Friendli Container first checks if the model is already cached at ~/.cache/huggingface/hub and uses it if available. If not, it will download the model from the Hugging Face Models Hub before launching the container. When a local path is provided, it will load the model from the location without downloading. This option is only available for models in a safetensors format.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--tokenizer-file-path`})}),_jsx(_components.td,{children:`TEXT`}),_jsxs(_components.td,{children:[`Absolute path of tokenizer file. This option is not needed when `,_jsx(_components.code,{children:`tokenizer.json`}),` is located under the path specified at `,_jsx(_components.code,{children:`--ckpt-path`}),`.`]}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--tokenizer-add-special-tokens`})}),_jsx(_components.td,{children:`BOOLEAN`}),_jsxs(_components.td,{children:[`Whether or not to add special tokens in tokenization. Equivalent to Hugging Face Tokenizer’s `,_jsx(_components.code,{children:`add_special_tokens`}),` argument. The default value is `,_jsx(_components.strong,{children:`false`}),` for versions \u003c v1.6.0.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--tokenizer-skip-special-tokens`})}),_jsx(_components.td,{children:`BOOLEAN`}),_jsxs(_components.td,{children:[`Whether or not to remove special tokens in detokenization. Equivalent to Hugging Face Tokenizer’s `,_jsx(_components.code,{children:`skip_special_tokens`}),` argument.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--dtype`})}),_jsx(_components.td,{children:`CHOICE: [bf16, fp16, fp32]`}),_jsxs(_components.td,{children:[`Data type of weights and activations. Choose one of \u003cfp16|bf16|fp32>. This argument applies to non-quantized weights and activations. If not specified, Friendli Container follows the value of `,_jsx(_components.code,{children:`torch_dtype`}),` in `,_jsx(_components.code,{children:`config.json`}),` file or assumes fp16.`]}),_jsx(_components.td,{children:`fp16`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--bad-stop-file-path`})}),_jsx(_components.td,{children:`TEXT`}),_jsx(_components.td,{children:`JSON file path that contains stop sequences or bad words/tokens.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--num-request-threads`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Thread pool size for handling HTTP requests.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--timeout-microseconds`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Server-side timeout for client requests, in microseconds.`}),_jsx(_components.td,{children:`0 (no timeout)`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--ignore-nan-error`})}),_jsx(_components.td,{children:`BOOLEAN`}),_jsx(_components.td,{children:`If set to True, ignore NaN error. Otherwise, respond with a 400 status code if NaN values are detected while processing a request.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--max-batch-size`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Max number of sequences that can be processed in a batch.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`384`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`--num-devices`}),`, `,_jsx(_components.code,{children:`-d`})]}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Number of devices to use as the tensor parallelism degree.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--search-policy`})}),_jsx(_components.td,{children:`BOOLEAN`}),_jsxs(_components.td,{children:[`Searches for the best engine policy for the given combination of model, hardware, and parallelism degree. Learn more about policy search at `,_jsx(_components.a,{href:`/archive/container/guides/optimizing-inference-with-policy-search`,children:`Optimizing Inference with Policy Search`}),`.`]}),_jsx(_components.td,{children:`false`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--terminate-after-search`})}),_jsx(_components.td,{children:`BOOLEAN`}),_jsx(_components.td,{children:`Terminates engine container after the policy search.`}),_jsx(_components.td,{children:`false`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--algo-policy-dir`})}),_jsx(_components.td,{children:`TEXT`}),_jsxs(_components.td,{children:[`Path to directory containing the policy file. The default value is the current working directory. Learn more about policy search at `,_jsx(_components.a,{href:`/archive/container/guides/optimizing-inference-with-policy-search`,children:`Optimizing Inference with Policy Search`}),`.`]}),_jsx(_components.td,{children:`current working dir`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--adapter-model`})}),_jsx(_components.td,{children:`TEXT`}),_jsx(_components.td,{children:`Add an adapter model with adapter name and path; \u003cadapter_name>:\u003cadapter_ckpt_path>. The path can be a name from a Hugging Face model hub.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`❌`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`model-specific-options`,children:`Model Specific Options`}),`\n`,_jsx(Heading,{level:`4`,id:`t5`,children:`T5`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Options`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Summary`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--max-input-length`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Maximum input length.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--max-output-length`})}),_jsx(_components.td,{children:`INT`}),_jsx(_components.td,{children:`Maximum output length.`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`✅`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configuration","sidebarTitle":"Configuration","description":"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.","og:description":"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.","href":"/archive/container/guides/configuration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Passing Launch Options","slug":"passing-launch-options","depth":2,"children":[]},{"title":"Multi-GPU Serving","slug":"multi-gpu-serving","depth":2,"children":[{"title":"Tensor Parallelism","slug":"tensor-parallelism","depth":3,"children":[]},{"title":"Examples","slug":"examples","depth":3,"children":[]}]},{"title":"Quantization","slug":"quantization","depth":2,"children":[]},{"title":"Serving MoE Models","slug":"serving-moe-models","depth":2,"children":[]},{"title":"Options for Running Friendli Container","slug":"options-for-running-friendli-container","depth":2,"children":[{"title":"General Options","slug":"general-options","depth":3,"children":[]},{"title":"Launch Options","slug":"launch-options","depth":3,"children":[]},{"title":"Model Specific Options","slug":"model-specific-options","depth":3,"children":[]},{"title":"T5","slug":"t5","depth":4,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/friendliai/13360a4393f88fc7/script.js"],"subdomain":"friendliai","siteName":"FriendliAI Docs","title":"Configuration - FriendliAI Docs","contextualStarterQuestions":[{"_id":"6adfcd1972c53fc64673c38c","deploymentId":"66d1620afd71f66abaace95b","questionText":"How do I serve on multiple GPUs?","status":"active","generatedBy":"contextual","path":"archive/container/guides/configuration","createdAt":"2026-10-26T21:58:49.293Z","updatedAt":"2026-10-26T21:58:49.293Z","__v":0},{"_id":"6adfcd1972c53fc64673c38a","deploymentId":"66d1620afd71f66abaace95b","questionText":"How do I pass launch options?","status":"active","generatedBy":"contextual","path":"archive/container/guides/configuration","createdAt":"2026-10-26T21:58:49.293Z","updatedAt":"2026-10-26T21:58:49.293Z","__v":0},{"_id":"6adfcd1972c53fc64673c38b","deploymentId":"66d1620afd71f66abaace95b","questionText":"What is tensor parallelism?","status":"active","generatedBy":"contextual","path":"archive/container/guides/configuration","createdAt":"2026-10-26T21:58:49.293Z","updatedAt":"2026-10-26T21:58:49.293Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T21:58:20.568Z","gitLastModified":"2026-10-26T21:57:11.000Z","originalFileLocation":"archive/container/guides/configuration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FriendliAI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configuration - FriendliAI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FriendliAI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://friendli.ai/docs/archive/container/guides/configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://friendliai.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Configuration\u0026amp;description=Configuration+reference+for+Friendli+Container%3A+how+to+pass+launch+options%2C+serve+across+multiple+GPUs%2C+enable+quantization%2C+and+run+MoE+models.\u0026amp;theme=8d0579d800ace9672a43ac47\u0026amp;signature=f8498ad4b422b6affc379c83f352ff4f878c6eb695a0ad28f56eb5d9dfa996a9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configuration - FriendliAI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://friendliai.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Configuration\u0026amp;description=Configuration+reference+for+Friendli+Container%3A+how+to+pass+launch+options%2C+serve+across+multiple+GPUs%2C+enable+quantization%2C+and+run+MoE+models.\u0026amp;theme=8d0579d800ace9672a43ac47\u0026amp;signature=f8498ad4b422b6affc379c83f352ff4f878c6eb695a0ad28f56eb5d9dfa996a9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/friendliai/f_6Xi29vsyX4mJlf/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FriendliAI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2A62DB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://friendli.ai/docs/archive/container/guides/configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/archive/container/guides/configuration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://friendli.ai/#organization\",\"name\":\"FriendliAI Docs\",\"url\":\"https://friendli.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/friendliai/Xn-EfFlXFvptInk9/static/svgs/logo.svg?fit=max\u0026auto=format\u0026n=Xn-EfFlXFvptInk9\u0026q=85\u0026s=0a04a5dd2152a1258e6d3ce995b70eb0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://friendli.ai/docs#website\",\"name\":\"FriendliAI Docs\",\"url\":\"https://friendli.ai/docs\",\"publisher\":{\"@id\":\"https://friendli.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://friendli.ai/docs/archive/container/guides/configuration#webpage\",\"url\":\"https://friendli.ai/docs/archive/container/guides/configuration\",\"name\":\"Configuration\",\"description\":\"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.\",\"dateModified\":\"2026-10-26T21:57:11.000Z\",\"isPartOf\":{\"@id\":\"https://friendli.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://friendli.ai/docs/archive/container/guides/configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://friendli.ai/docs/archive/container/guides/configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friendli Container\",\"item\":\"https://friendli.ai/docs/archive/container/guides/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guides\",\"item\":\"https://friendli.ai/docs/archive/container/guides/introduction\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Configuration\",\"item\":\"https://friendli.ai/docs/archive/container/guides/configuration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://friendli.ai/docs/archive/container/guides/configuration#article\",\"headline\":\"Configuration\",\"name\":\"Configuration\",\"description\":\"Configuration reference for Friendli Container: how to pass launch options, serve across multiple GPUs, enable quantization, and run MoE models.\",\"url\":\"https://friendli.ai/docs/archive/container/guides/configuration\",\"mainEntityOfPage\":{\"@id\":\"https://friendli.ai/docs/archive/container/guides/configuration#webpage\"},\"dateModified\":\"2026-10-26T21:57:11.000Z\",\"publisher\":{\"@id\":\"https://friendli.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://friendli.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FriendliAI Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"FriendliAI Docs","nav":{"global":{"anchors":[{"anchor":"Home","icon":"home","href":"https://friendli.ai"},{"anchor":"Models","icon":"brain","href":"https://friendli.ai/models"},{"anchor":"Pricing","icon":"tag","href":"https://friendli.ai/pricing"},{"anchor":"Blog","icon":"newspaper","href":"https://friendli.ai/blog"}]},"tabs":[{"tab":"Home","hidden":true,"searchable":true,"pages":[{"title":"Home","href":""}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction/overview"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/examples/models/overview"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/openapi/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"Archive","hidden":true,"searchable":true,"groups":[{"group":"Friendli Container","pages":[{"group":"Guides","icon":"book-open","expanded":true,"pages":[{"title":"Introducing Friendli Container","sidebarTitle":"Introduction","description":"Deploy generative AI models on your own infrastructure with Friendli Container. Full control over GPU resources, networking, and scaling.","href":"/archive/container/guides/introduction"},{"title":"QuickStart: Friendli Container Trial","sidebarTitle":"QuickStart","description":"Get started with Friendli Container trial. Access the registry, configure your secret, launch the container, and monitor with Grafana.","href":"/archive/container/guides/quickstart"},{"title":"Configuration","sidebarTitle":"Configuration","href":"/archive/container/guides/configuration"},{"title":"CUDA Compatibility","sidebarTitle":"CUDA Compatibility","description":"The Friendli Engine supports CUDA-enabled NVIDIA GPUs, which means it relies on a specific version of CUDA and necessitates proper CUDA compute compatibilities.","href":"/archive/container/guides/cuda-compatibility"},{"title":"Serving Multi-LoRA Models","sidebarTitle":"Multi-LoRA Serving","description":"Serve multiple LoRA-adapted LLMs simultaneously with Friendli Container without additional GPU resources. No retraining needed for task-specific models.","href":"/archive/container/guides/serving-multi-lora-models"},{"title":"Serving MoE Models","sidebarTitle":"MoE Models Serving","description":"Serve Mixture of Experts (MoE) models like Mixtral 8x7B with Friendli Container. Covers policy search setup and multi-GPU Docker configuration.","href":"/archive/container/guides/serving-moe-models"},{"title":"Quantization","sidebarTitle":"Quantization","description":"Learn how to serve pre-quantized models or perform online quantization with Friendli Container to reduce memory and speed up inference.","href":"/archive/container/guides/quantization"},{"title":"Optimize with Policy Search","sidebarTitle":"Optimize with Policy Search","description":"Boost inference throughput by up to 2x for MoE and quantized models by running execution policy search in Friendli Container for production.","href":"/archive/container/guides/optimizing-inference-with-policy-search"},{"title":"Running Friendli Container on SageMaker","sidebarTitle":"SageMaker Integration","description":"Create a real-time inference endpoint in Amazon SageMaker with Friendli Container. Use Friendli Engine for faster, cost-efficient serving.","href":"/archive/container/guides/sagemaker-integration"},{"title":"Deploy Friendli Container as Amazon EKS Add-On","sidebarTitle":"AWS EKS Add-On","description":"Deploy Friendli Container on Amazon EKS using the official AWS EKS Add-On. Set up GPU nodes, install the add-on, and run model inference.","href":"/archive/container/guides/eks-quickstart"},{"title":"Inference with gRPC","sidebarTitle":"Inference with gRPC","description":"Run a gRPC inference server with Friendli Container and send requests using the Friendli Python SDK. Includes setup, configuration, and code examples.","href":"/archive/container/guides/inference-with-grpc"},{"title":"Observability for Friendli Container","sidebarTitle":"Monitoring","description":"Observability is an integral part of DevOps. To support this, Friendli Container exports internal metrics in a Prometheus text format.","href":"/archive/container/guides/monitoring"}]},{"group":"API Reference","icon":"code","expanded":true,"pages":[{"title":"Container Overview","sidebarTitle":"Overview","description":"API reference for Friendli Container. Browse self-hosted inference endpoints for chat, responses, completions, messages, tokenization, images, and audio transcription.","href":"/openapi/container/overview"},{"group":"Inference","pages":[{"title":"Container Chat Completions","description":"Generate a model response from a list of messages comprising a conversation. Compatible with the OpenAI Chat Completions API, with support for streaming, tool calls, and structured outputs.","deprecated":null,"version":null,"sidebarTitle":"Chat Completions","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/chat/completions","href":"/openapi/container/chat-completions"},{"title":"Container Responses","description":"Generate a model response from text or image inputs. Follows the OpenAI Responses API format, with support for streaming, function and custom tool calls, structured outputs, and reasoning controls.","deprecated":null,"version":null,"sidebarTitle":"Responses","tag":"Beta","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/responses","href":"/openapi/container/responses"},{"title":"Container Messages","description":"Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.","deprecated":null,"version":null,"sidebarTitle":"Messages","tag":"Beta","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/messages","href":"/openapi/container/messages"},{"title":"Container Completions","description":"Generate a text completion from a prompt or token sequence. Supports streaming and configurable generation parameters.","deprecated":null,"version":null,"sidebarTitle":"Completions","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/completions","href":"/openapi/container/completions"},{"title":"Container Text Classification","description":"Classify text input into categories with per-class probabilities.","deprecated":null,"version":null,"sidebarTitle":"Text Classification","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /classify","href":"/openapi/container/text-classification"},{"title":"Container Tokenization","description":"Convert text input into token IDs.","deprecated":null,"version":null,"sidebarTitle":"Tokenization","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/tokenize","href":"/openapi/container/tokenization"},{"title":"Container Detokenization","description":"Convert a list of token IDs back into text.","deprecated":null,"version":null,"sidebarTitle":"Detokenization","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/detokenize","href":"/openapi/container/detokenization"},{"title":"Container Image Generations","description":"Generate an image from a text prompt.","deprecated":null,"version":null,"sidebarTitle":"Image Generations","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/images/generations","href":"/openapi/container/image-generations"},{"title":"Container Image Edits","description":"Edit an image based on a text prompt.","deprecated":null,"version":null,"sidebarTitle":"Image Edits","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/images/edits","href":"/openapi/container/image-edits"},{"title":"Container Audio Transcriptions","description":"Transcribe an audio file into text.","deprecated":null,"version":null,"sidebarTitle":"Audio Transcriptions","openapi":"https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/audio/transcriptions","href":"/openapi/container/audio-transcriptions"}]}]}]},{"group":"Friendli Python SDK","pages":[{"title":"Friendli Python SDK","sidebarTitle":"How-To","icon":"file-lines","description":"Install and use the Friendli Python SDK to access Model APIs, Dedicated Endpoints, and Container. Covers chat, completions, streaming, and async usage.","href":"/archive/python-sdk/how-to"}]}]}]},"basePath":"","title":"Configuration - FriendliAI Docs","buildId":"dpl_Acry4NrQAgjcikyFgVE2eJ7XQCAv","deploymentId":"dpl_Acry4NrQAgjcikyFgVE2eJ7XQCAv","dynamics":["10e4515597"],"chunks":["BannerMarkdown-y1yOetA_.js","dist-DOFIgHLg.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-Cc5SnnvQ.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}