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

jejun
/
flax-recipe-generator

Text Generation
Transformers
PyTorch
google-tensorflow TensorFlow
JAX
TensorBoard
English
t5
text2text-generation
seq2seq
recipe-generation
text-generation-inference
Model card Files Files and versions
xet
Metrics Training metrics Community
1

Instructions to use jejun/flax-recipe-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use jejun/flax-recipe-generator with Transformers:

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

    How to use jejun/flax-recipe-generator with vLLM:

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

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

    How to use jejun/flax-recipe-generator with Docker Model Runner:

    docker model run hf.co/jejun/flax-recipe-generator
flax-recipe-generator
2.94 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 10 commits
jejun's picture
jejun
Update src/prediction.py
2f66a77 about 3 years ago
  • data
    Upload 22 files about 3 years ago
  • demo
    Update demo/beam_search.py about 3 years ago
  • notes
    Upload 22 files about 3 years ago
  • src
    Update src/prediction.py about 3 years ago
  • .gitattributes
    780 Bytes
    Upload 11 files about 3 years ago
  • README.md
    8.69 kB
    Upload 11 files about 3 years ago
  • chef-transformer.png
    140 kB
    Upload 11 files about 3 years ago
  • config.json
    1.57 kB
    Upload 11 files about 3 years ago
  • events.out.tfevents.1625725210.t1v-n-a0c138ef-w-0.183348.3.v2
    20.3 MB
    xet
    Upload 11 files about 3 years ago
  • flax_model.msgpack
    892 MB
    xet
    Upload 11 files about 3 years ago
  • pytorch_model.bin

    Detected Pickle imports (3)

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

    What is a pickle import?

    892 MB
    xet
    Upload 11 files about 3 years ago
  • special_tokens_map.json
    1.79 kB
    Upload 11 files about 3 years ago
  • tf_model.h5
    892 MB
    xet
    Upload 11 files about 3 years ago
  • tokenizer.json
    1.39 MB
    Upload 11 files about 3 years ago
  • tokenizer_config.json
    1.92 kB
    Upload 11 files about 3 years ago