Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

mlx-community
/
Mistral-7B-v0.1-LoRA-Text2SQL

Text Generation
Transformers
GGUF
mistral
Model card Files Files and versions
xet
Community

Instructions to use mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL")
    model = AutoModelForCausalLM.from_pretrained("mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL with vLLM:

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

    How to use mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL 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 "mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL" \
        --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": "mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL",
    		"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 "mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL" \
            --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": "mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL with Docker Model Runner:

    docker model run hf.co/mlx-community/Mistral-7B-v0.1-LoRA-Text2SQL
Mistral-7B-v0.1-LoRA-Text2SQL
22.2 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 4 commits
wangjunjian's picture
wangjunjian
Upload Mistral-7B-v0.1-LoRA-Text2SQL.Q8_0.gguf
71857e7 verified over 2 years ago
  • .gitattributes
    1.6 kB
    Upload Mistral-7B-v0.1-LoRA-Text2SQL.Q8_0.gguf over 2 years ago
  • Mistral-7B-v0.1-LoRA-Text2SQL.Q8_0.gguf
    7.7 GB
    xet
    Upload Mistral-7B-v0.1-LoRA-Text2SQL.Q8_0.gguf over 2 years ago
  • README.md
    9.62 kB
    Update upload model to huggingface hub. over 2 years ago
  • config.json
    616 Bytes
    Fine tuning Text2SQL based on Mistral-7B using LoRA on MLX over 2 years ago
  • special_tokens_map.json
    414 Bytes
    Fine tuning Text2SQL based on Mistral-7B using LoRA on MLX over 2 years ago
  • tokenizer.json
    1.8 MB
    Fine tuning Text2SQL based on Mistral-7B using LoRA on MLX over 2 years ago
  • tokenizer.model
    493 kB
    xet
    Fine tuning Text2SQL based on Mistral-7B using LoRA on MLX over 2 years ago
  • tokenizer_config.json
    967 Bytes
    Fine tuning Text2SQL based on Mistral-7B using LoRA on MLX over 2 years ago
  • weights.00.safetensors
    14.5 GB
    xet
    Fine tuning Text2SQL based on Mistral-7B using LoRA on MLX over 2 years ago