rachfop's picture
Upload folder using huggingface_hub
cd2cfb6 verified

MAX Custom Architecture Example

This is a simple demonstration model for the MyCustomModelForCausalLM architecture used in the MAX custom architecture example.

Model Details

  • Architecture: MyCustomModelForCausalLM
  • Parameters: ~289,280
  • Vocab Size: 1000
  • Hidden Size: 128
  • Layers: 2
  • Dtype: float32

Usage with MAX

max generate \
  --model-path rachfop/max-custom-architecture-example \
  --custom-architectures /path/to/max/examples/custom-model-architectures \
  --quantization-encoding float32 \
  --prompt "Hello world" \
  --max-new-tokens 10

Purpose

This model is intended for demonstration purposes to show how to:

  1. Create a custom model architecture for MAX
  2. Upload it to Hugging Face
  3. Load and use it with MAX's custom architecture system

The model generates random outputs and is not trained for any specific task.

Architecture Implementation

See the MAX custom architecture example for the complete implementation including:

  • Model definition (model.py)
  • Architecture registration (arch.py)
  • Configuration handling (model_config.py)
  • Weight adapters (weight_adapters.py)