Build
Build with CommonMind
From experimentation to production. Open models, APIs, and deployment tools for building multilingual AI applications grounded in civic discourse.
- OPEN MODELS
- APIs
- DEPLOYMENT
Quickstart
From code to inference in minutes
Load an open model with Transformers and PEFT to run English-to-Swahili translation locally.
quickstart.py
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from peft import PeftModel
base = "facebook/nllb-200-distilled-600M"
tok = AutoTokenizer.from_pretrained(base, src_lang="eng_Latn")
model = PeftModel.from_pretrained(
AutoModelForSeq2SeqLM.from_pretrained(base),
"AmplifiedAccess/Swahili-nllb-600m",
)
inputs = tok("The clinic has had no medicine for two weeks.", return_tensors="pt")
out = model.generate(
**inputs,
forced_bos_token_id=tok.convert_tokens_to_ids("swh_Latn"),
max_new_tokens=128,
)
print(tok.decode(out[0], skip_special_tokens=True))Developer Journey
Discover. Install. Run. Build. Deploy
A clear path from exploring open models to integrating multilingual capabilities into real-world applications.
Explore available models, supported languages, capabilities, and evaluation results.
terminal
curl -s "https://huggingface.co/api/models?author=AmplifiedAccess" \
| jq '.[].id'Deployment
Built for your infrastructure
Integrate CommonMind models into existing development environments, from local experimentation to production systems.
- 01PythonModel inference using Transformers and PEFT.
- 02Hugging FaceOpen weights, adapters, and model documentation.
- 03OllamaLocal inference for compatible quantized models.
- 04APIProgrammatic access through supported endpoints.
- 05LocalDeployment on personal machines or dedicated GPUs.
- 06EdgeLightweight inference for compatible models in resource-constrained environments.
API
One interface. Multiple models
Access multilingual translation through a consistent API, with simple requests for model selection, text input, and language direction.
POST /translate
- model_slug
- Identifier of the model to run
- text
- Input text, up to 500 characters
- direction
- Translation direction for supported models
Request
curl -X POST "$COMMONMIND_URL/translate" \
-H "Content-Type: application/json" \
-H "X-API-Key: $COMMONMIND_KEY" \
-d '{
"model_slug": "swahili-nllb-1-3b",
"text": "Residents report that the borehole has been broken since March."
}'Example response
{
"translation": "...",
"model_slug": "swahili-nllb-1-3b"
}