Instructions to use architext/gptj-162M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use architext/gptj-162M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="architext/gptj-162M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("architext/gptj-162M") model = AutoModelForCausalLM.from_pretrained("architext/gptj-162M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use architext/gptj-162M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "architext/gptj-162M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "architext/gptj-162M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/architext/gptj-162M
- SGLang
How to use architext/gptj-162M 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 "architext/gptj-162M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "architext/gptj-162M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "architext/gptj-162M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "architext/gptj-162M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use architext/gptj-162M with Docker Model Runner:
docker model run hf.co/architext/gptj-162M
Nice work on residential layout generation — how do you handle room adjacency constraints?
Really cool project — the idea of using a GPT-J variant to generate architectural layouts from natural language prompts is a great approach, and the geometric representation you're using seems flexible enough for downstream CAD/rendering pipelines.
Curious how you're handling room adjacency constraints (e.g. kitchen near dining, bathroom not adjacent to bedroom entrance) during generation — is that baked into the training data distribution, or is there a post-processing/validation step?
For context, we've been working on a similar problem from a different angle — going from a floor plan (sketch or rough layout) to a fully rendered, style-consistent visualization, plus some auto-layout tooling. If anyone here is exploring the generation → rendering pipeline, might be a useful reference point: AI Floor Plan Generator
Would love to hear more about how the model performs on non-rectangular boundaries or multi-story constraints — any plans to extend beyond single-floor apartments?
Hello! Thanks for the kind words, also didn't expect people around here after so many years :)
Indeed,adjacencies were learned from data distribution. That's powerful but also as you can imagine limiting given data was not that diverse necessarily. That said, I found models (even the ones used here from almost 4 years ago) could generalise quite well (especially when they were producing outputs not fitting to user's prompt!).
And because models learned to create valid designs (check paper, 99% validity for most models), it made them interesting data generation engines.
I can imagine models today can (1) do a lot of this in context and (2) could be finetuned to incorporate a lot more detail and nuance. I haven't had time to work on this, but still a cool area of research.