Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

fractaldna22
/
GPT_2_Marxism

Text Generation
Transformers
PyTorch
gpt2
text-generation-inference
Model card Files Files and versions
xet
Community

Instructions to use fractaldna22/GPT_2_Marxism with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use fractaldna22/GPT_2_Marxism with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="fractaldna22/GPT_2_Marxism")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("fractaldna22/GPT_2_Marxism")
    model = AutoModelForCausalLM.from_pretrained("fractaldna22/GPT_2_Marxism")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use fractaldna22/GPT_2_Marxism with vLLM:

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

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

    How to use fractaldna22/GPT_2_Marxism with Docker Model Runner:

    docker model run hf.co/fractaldna22/GPT_2_Marxism

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Gated model
You can list files but not access them

Preview of files found in this repository
  • .gitattributes
    1.18 kB
    initial commit over 4 years ago
  • README.md
    2.87 kB
    Update README.md over 4 years ago
  • config.json
    1.13 kB
    Upload model over 3 years ago
  • merges.txt
    456 kB
    Upload merges.txt over 4 years ago
  • metadata.yaml
    0 Bytes
    Create metadata.yaml over 3 years ago
  • model_card.md
    447 Bytes
    Create model_card.md over 4 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

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

    What is a pickle import?

    1.44 GB
    xet
    Upload model over 3 years ago
  • special_tokens_map.json
    435 Bytes
    Upload special_tokens_map.json over 4 years ago
  • tags.md
    397 Bytes
    Create tags.md over 4 years ago
  • tokenizer.json
    1.36 MB
    Upload tokenizer.json over 4 years ago
  • tokenizer_config.json
    560 Bytes
    Update tokenizer_config.json over 4 years ago
  • vocab.json
    798 kB
    Upload vocab.json over 4 years ago
  • widget.json
    401 Bytes
    Create widget.json over 4 years ago
  • widget.md
    402 Bytes
    Update widget.md over 4 years ago