Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • 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")
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("fractaldna22/GPT_2_Marxism")
    model = AutoModelForCausalLM.from_pretrained("fractaldna22/GPT_2_Marxism", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • 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 Hugging Face 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 almost 5 years ago
  • README.md
    2.87 kB
    Update README.md almost 5 years ago
  • config.json
    1.13 kB
    Upload model almost 4 years ago
  • merges.txt
    456 kB
    Upload merges.txt almost 5 years ago
  • metadata.yaml
    0 Bytes
    Create metadata.yaml almost 4 years ago
  • model_card.md
    447 Bytes
    Create model_card.md almost 5 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 almost 4 years ago
  • special_tokens_map.json
    435 Bytes
    Upload special_tokens_map.json almost 5 years ago
  • tags.md
    397 Bytes
    Create tags.md almost 5 years ago
  • tokenizer.json
    1.36 MB
    Upload tokenizer.json almost 5 years ago
  • tokenizer_config.json
    560 Bytes
    Update tokenizer_config.json almost 5 years ago
  • vocab.json
    798 kB
    Upload vocab.json almost 5 years ago
  • widget.json
    401 Bytes
    Create widget.json almost 5 years ago
  • widget.md
    402 Bytes
    Update widget.md almost 5 years ago