Instructions to use badrdesigner/AM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use badrdesigner/AM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="badrdesigner/AM") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("badrdesigner/AM") model = AutoModelForCausalLM.from_pretrained("badrdesigner/AM", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use badrdesigner/AM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "badrdesigner/AM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "badrdesigner/AM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/badrdesigner/AM
- SGLang
How to use badrdesigner/AM with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "badrdesigner/AM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "badrdesigner/AM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "badrdesigner/AM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "badrdesigner/AM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use badrdesigner/AM with Docker Model Runner:
docker model run hf.co/badrdesigner/AM
AM — Hugging Face preparation
AM remains the user-facing product identity. This package implements the AM persona and local Transformers CUDA runtime; the foundation weights are Qwen/Qwen2.5-1.5B-Instruct, duplicated unchanged from its public Apache-2.0 repository.
Hugging Face repository status
- Public model repository:
badrdesigner/AM - Foundation model source:
Qwen/Qwen2.5-1.5B-Instruct - Model weights are duplicated server-side by Hugging Face and were not fine-tuned, changed, or downloaded to this workstation.
- The duplicated repository retains the upstream
LICENSE, model config, tokenizer, and safetensors. This README documents AM and identifies the upstream source. - AM runtime source is present under
am_model/; requirements, local setup, summary, and the Kaggle smoke-test script are also in the repository.
The Hugging Face Duplicate this model action copies the original model and
its files. It does not merge application source code into the weight files.
AM behavior is implemented in the application runtime, not by altering the
weights.
Runtime
The runtime uses local-only Transformers loading and requires a CUDA GPU. It never downloads weights during application startup. For a Kaggle notebook with access to the public repository:
from huggingface_hub import snapshot_download
model_path = snapshot_download("badrdesigner/AM")
Set AM_MODEL_PATH to the downloaded snapshot path before running AM.
AM_MODEL_REPO_ID defaults to badrdesigner/AM. Missing local files,
dependencies, or CUDA are reported explicitly. The mock brief fallback is
clearly marked and can be disabled with AM_ALLOW_MOCK_FALLBACK=false.
The runtime serves:
POST /v1/brief: AM's validated 13-dimension graphic-design brief.POST /v1/run: the brief plus separate Pinterest References and Elements metadata collections.POST /v1/references/pinterestandPOST /v1/elements: explicit, separate DDGS image-search contracts.
Pinterest searches return metadata candidates only. They do not download images, verify reuse rights, make transparent cutouts, place assets into a PSD, or guarantee 50 references, 20 elements, or a particular response time.
Kaggle smoke test
Run tests/kaggle_smoke_test.py in a CUDA Kaggle notebook after the model
snapshot is available. It downloads badrdesigner/AM, disables mock fallback,
and checks three design-brief prompts for real inference, AM identity, 13
dimensions, and three or four creative directions.
That smoke test does not verify live Pinterest results, image generation,
PSD structure, six groups, 20 layers, editable text, Arabic font rendering,
or Photoshop compatibility. The three PSDs in tests/local-test-results/
are local mock fixtures, not outputs of this model.
Ollama Modelfile
An Ollama Modelfile is not a Hugging Face Transformers configuration and
cannot be used to configure this repository's Transformers runtime. AM's
system prompt and generation parameters are defined in am_model/am_core.py.
- Downloads last month
- -