Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

connaaa
/
interpgpt-standard-23M

Text Generation
Transformers
Safetensors
interpgpt
interpretability
mechanistic-interpretability
task-decomposition
small-language-model
transformer-lens
custom_code
Model card Files Files and versions
xet
Community

Instructions to use connaaa/interpgpt-standard-23M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use connaaa/interpgpt-standard-23M with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="connaaa/interpgpt-standard-23M", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("connaaa/interpgpt-standard-23M", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use connaaa/interpgpt-standard-23M with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "connaaa/interpgpt-standard-23M"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "connaaa/interpgpt-standard-23M",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/connaaa/interpgpt-standard-23M
  • SGLang

    How to use connaaa/interpgpt-standard-23M 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 "connaaa/interpgpt-standard-23M" \
        --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": "connaaa/interpgpt-standard-23M",
    		"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 "connaaa/interpgpt-standard-23M" \
            --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": "connaaa/interpgpt-standard-23M",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use connaaa/interpgpt-standard-23M with Docker Model Runner:

    docker model run hf.co/connaaa/interpgpt-standard-23M
interpgpt-standard-23M
504 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
connaaa's picture
connaaa
Phase 1 release: InterpGPT matched-pair checkpoint
f2f93d1 verified 17 days ago
  • .gitattributes
    91 Bytes
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago
  • InterpGPT_HeadSwap.ipynb
    20.6 kB
    Add head-swap reproduction Colab notebook 19 days ago
  • README.md
    4.68 kB
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago
  • config.json
    769 Bytes
    Phase 1 release: InterpGPT matched-pair checkpoint 17 days ago
  • configuration_interpgpt.py
    1.09 kB
    fix: avoid duplicate pad_token_id kwarg on config reload 19 days ago
  • hooked_transformer.pt

    Detected Pickle imports (8)

    • "torch.BoolStorage",
    • "numpy.dtype",
    • "numpy._core.multiarray.scalar",
    • "torch._utils._rebuild_tensor_v2",
    • "torch.FloatStorage",
    • "_codecs.encode",
    • "collections.OrderedDict",
    • "torch.float32"

    How to fix it?

    114 MB
    xet
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago
  • model.safetensors
    101 MB
    xet
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago
  • modeling_interpgpt.py
    7.93 kB
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago
  • pytorch_model.pt

    Detected Pickle imports (3)

    • "torch._utils._rebuild_tensor_v2",
    • "collections.OrderedDict",
    • "torch.FloatStorage"

    What is a pickle import?

    289 MB
    xet
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago
  • tokenizer.json
    550 kB
    Phase 1 release: InterpGPT matched-pair checkpoint 19 days ago