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

hbfreed
/
flex-general-2048

Text Generation
Transformers
Safetensors
English
pruned_flex_olmo
custom_code
pruned
distilled
mixture-of-experts
Model card Files Files and versions
xet
Community

Instructions to use hbfreed/flex-general-2048 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use hbfreed/flex-general-2048 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="hbfreed/flex-general-2048", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("hbfreed/flex-general-2048", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use hbfreed/flex-general-2048 with vLLM:

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

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

    How to use hbfreed/flex-general-2048 with Docker Model Runner:

    docker model run hf.co/hbfreed/flex-general-2048
flex-general-2048
19.4 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 28 commits
hbfreed's picture
hbfreed
Upload README.md with huggingface_hub
9317eec verified 2 months ago
  • .gitattributes
    1.52 kB
    initial commit 4 months ago
  • README.md
    2.92 kB
    Upload README.md with huggingface_hub 2 months ago
  • checkpoint_info.json
    15 Bytes
    step_18999 4 months ago
  • config.json
    2.53 kB
    Upload config.json with huggingface_hub 4 months ago
  • configuration_pruned_flex_olmo.py
    699 Bytes
    Upload configuration_pruned_flex_olmo.py with huggingface_hub 4 months ago
  • model.safetensors
    16.2 GB
    xet
    step_18999 4 months ago
  • modeling_pruned_flex_olmo.py
    2.5 kB
    Fix relative import for trust_remote_code 4 months ago
  • pruning_config.json
    105 Bytes
    Upload folder using huggingface_hub 4 months ago
  • training_state.pt

    Detected Pickle imports (5)

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

    What is a pickle import?

    3.22 GB
    xet
    step_18999 4 months ago