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

Lanni-ni
/
forgetting_gate_2_4_256

Text Generation
Transformers
Safetensors
forgetting_transformer-project_fox
custom_code
Model card Files Files and versions
xet
Community

Instructions to use Lanni-ni/forgetting_gate_2_4_256 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Lanni-ni/forgetting_gate_2_4_256 with Transformers:

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

    How to use Lanni-ni/forgetting_gate_2_4_256 with vLLM:

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

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

    How to use Lanni-ni/forgetting_gate_2_4_256 with Docker Model Runner:

    docker model run hf.co/Lanni-ni/forgetting_gate_2_4_256
forgetting_gate_2_4_256
3.08 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 10 commits
Lanni-ni's picture
Lanni-ni
Update modeling_transformer.py
4ae196e verified 7 months ago
  • .hydra
    add remote code + model files 7 months ago
  • __pycache__
    add remote code + model files 7 months ago
  • checkpoints
    add remote code + model files 7 months ago
  • logs
    add remote code + model files 7 months ago
  • metrics
    add remote code + model files 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    5.17 kB
    Upload ForgettingTransformerForCausalLM 7 months ago
  • __init__.py
    21 Bytes
    add remote code + model files 7 months ago
  • config.json
    1.21 kB
    Update config.json 7 months ago
  • config.yaml
    2.63 kB
    add remote code + model files 7 months ago
  • configuration_transformer.py
    2.21 kB
    add remote code + model files 7 months ago
  • decay_params.txt
    787 Bytes
    add remote code + model files 7 months ago
  • generation_config.json
    69 Bytes
    Upload ForgettingTransformerForCausalLM 7 months ago
  • model.safetensors
    110 MB
    xet
    Upload ForgettingTransformerForCausalLM 7 months ago
  • model.txt
    1.05 kB
    add remote code + model files 7 months ago
  • modeling_transformer.py
    36.3 kB
    Update modeling_transformer.py 7 months ago
  • no_decay_params.txt
    328 Bytes
    add remote code + model files 7 months ago
  • special_tokens_map.json
    441 Bytes
    Upload tokenizer 7 months ago
  • tokenizer.json
    2.11 MB
    Upload tokenizer 7 months ago
  • tokenizer_config.json
    4.81 kB
    Upload tokenizer 7 months ago