Instructions to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("makiisthebes/gemma-2-2b-Instruct-NL2SQL", dtype="auto") - llama-cpp-python
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="makiisthebes/gemma-2-2b-Instruct-NL2SQL", filename="unsloth.Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M # Run inference directly in the terminal: llama-cli -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M # Run inference directly in the terminal: llama-cli -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
Use Docker
docker model run hf.co/makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with Ollama:
ollama run hf.co/makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
- Unsloth Studio new
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for makiisthebes/gemma-2-2b-Instruct-NL2SQL to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for makiisthebes/gemma-2-2b-Instruct-NL2SQL to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for makiisthebes/gemma-2-2b-Instruct-NL2SQL to start chatting
- Docker Model Runner
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with Docker Model Runner:
docker model run hf.co/makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
- Lemonade
How to use makiisthebes/gemma-2-2b-Instruct-NL2SQL with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull makiisthebes/gemma-2-2b-Instruct-NL2SQL:Q4_K_M
Run and chat with the model
lemonade run user.gemma-2-2b-Instruct-NL2SQL-Q4_K_M
List all available models
lemonade list
(Trained with Unsloth)
Browse files- config.json +2 -37
config.json
CHANGED
|
@@ -1,38 +1,3 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
"Gemma2ForCausalLM"
|
| 5 |
-
],
|
| 6 |
-
"attention_bias": false,
|
| 7 |
-
"attention_dropout": 0.0,
|
| 8 |
-
"attn_logit_softcapping": 50.0,
|
| 9 |
-
"bos_token_id": 2,
|
| 10 |
-
"cache_implementation": "hybrid",
|
| 11 |
-
"eos_token_id": [
|
| 12 |
-
1,
|
| 13 |
-
107
|
| 14 |
-
],
|
| 15 |
-
"final_logit_softcapping": 30.0,
|
| 16 |
-
"head_dim": 256,
|
| 17 |
-
"hidden_act": "gelu_pytorch_tanh",
|
| 18 |
-
"hidden_activation": "gelu_pytorch_tanh",
|
| 19 |
-
"hidden_size": 2304,
|
| 20 |
-
"initializer_range": 0.02,
|
| 21 |
-
"intermediate_size": 9216,
|
| 22 |
-
"max_position_embeddings": 8192,
|
| 23 |
-
"model_type": "gemma2",
|
| 24 |
-
"num_attention_heads": 8,
|
| 25 |
-
"num_hidden_layers": 26,
|
| 26 |
-
"num_key_value_heads": 4,
|
| 27 |
-
"pad_token_id": 0,
|
| 28 |
-
"query_pre_attn_scalar": 256,
|
| 29 |
-
"rms_norm_eps": 1e-06,
|
| 30 |
-
"rope_scaling": null,
|
| 31 |
-
"rope_theta": 10000.0,
|
| 32 |
-
"sliding_window": 4096,
|
| 33 |
-
"torch_dtype": "float16",
|
| 34 |
-
"transformers_version": "4.46.3",
|
| 35 |
-
"unsloth_version": "2024.12.4",
|
| 36 |
-
"use_cache": true,
|
| 37 |
-
"vocab_size": 256000
|
| 38 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_type": "gemma2"
|
| 3 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|