Max llm tutorial bug

alexjacob@ho-sm-ai-proxy02:~/research/max-llm-book$ pixi run serve
WARN the lock file is up-to-date but uses an older format (v6), run pixi lock to upgrade to v7 for improved reproducibility
:sparkles: Pixi task (serve): max serve --custom-architectures gpt2_arch --model gpt2
21:54:09.960 INFO: Metrics initialized.
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
generation_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 124/124 [00:00<00:00, 345kB/s]
config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 665/665 [00:00<00:00, 4.28MB/s]
21:54:10.635 WARNING: Architecture ‘GPT2LMHeadModel’ requires KVCacheConfig.enable_prefix_caching=False, overriding current value True
Traceback (most recent call last):
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/bin/max”, line 10, in
sys.exit(main())
~~~~^^
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/click/core.py”, line 1524, in call
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/click/core.py”, line 1445, in main
rv = self.invoke(ctx)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/click/core.py”, line 1912, in invoke
return *process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/pipelines.py”, line 102, in invoke
return super().invoke(ctx)
~~~~~~~~~~~~~~^^^^^
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/click/core.py”, line 1308, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/click/core.py”, line 877, in invoke
return callback(*args, **kwargs)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/cli/config.py”, line 368, in wrapped
return func(*args, **kwargs)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/cli/config.py”, line 368, in wrapped
return func(*args, **kwargs)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/cli/config.py”, line 368, in wrapped
return func(*args, **kwargs)

Previous line repeated 7 more times

File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/cli/config.py”, line 500, in wrapper
return func(*args, **kwargs)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/pipelines.py”, line 200, in wrapper
return func(args, **kwargs)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/max/entrypoints/pipelines.py”, line 260, in cli_serve
pipeline_config = PipelineConfig(config_kwargs)
File “/home/alexjacob/research/max-llm-book/.pixi/envs/default/lib/python3.14/site-packages/pydantic/main.py”, line 263, in init****
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PipelineConfig
Value error, Invalid HF URI ‘hf://gpt2//*.safetensors’. Repo id must use alphanumeric chars, ‘-’, ‘’ or ‘.’. The name cannot start or end with ‘-’ or ‘.’ and the maximum length is 96: ‘gpt2/’. [type=value_error, input_value={‘custom_architectures’: …g_verify_replay’: False}, input_type=dict]
For further information visit Validation Errors | Pydantic Docs
alexjacob@ho-sm-ai-proxy02:~/research/max-llm-book$

Thanks for the well documented issue @alix. There were a couple of updates to our own and external imports here that we causing this breakage. I pushed the changes and it’s going out with the next nightly release.

Awesome, really appreciate that Michael !

Fix is in and I confirmed that it’s serving correctly again. Don’t hesitate to raise any questions you have as you read through it here!

I can play with it again , thanks a lot !