Instructions to use NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1") model = AutoModelForCausalLM.from_pretrained("NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1
- SGLang
How to use NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1 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 "NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1 with Docker Model Runner:
docker model run hf.co/NickyNicky/gemma-1.1-2b-it_text_to_sql_format_chatML_V1
Update README.md
Browse files
README.md
CHANGED
|
@@ -26,12 +26,6 @@ widget:
|
|
| 26 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/641b435ba5f876fe30c5ae0a/Fy2GvAheKCnd3Jj3TbrPG.png" alt="" style="width: 95%; max-height: 750px;">
|
| 27 |
</p>
|
| 28 |
|
| 29 |
-
|
| 30 |
-
## $ train
|
| 31 |
-
<p align="center">
|
| 32 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/641b435ba5f876fe30c5ae0a/tLhUyV2uW44-Cf0vwXFbd.png" alt="" style="width: 95%; max-height: 750px;">
|
| 33 |
-
</p>
|
| 34 |
-
|
| 35 |
## Metrics.
|
| 36 |
```
|
| 37 |
TrainOutput(global_step=2509,
|
|
@@ -64,4 +58,9 @@ https://colab.research.google.com/drive/1-0PsRAqTum2UuvsXb9JtXxLISIUWd8zv?usp=sh
|
|
| 64 |
## gradio colab.
|
| 65 |
<p align="center">
|
| 66 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/641b435ba5f876fe30c5ae0a/X2rf3Z7jJ2WUI7LANw4IH.png" alt="" style="width: 95%; max-height: 750px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
</p>
|
|
|
|
| 26 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/641b435ba5f876fe30c5ae0a/Fy2GvAheKCnd3Jj3TbrPG.png" alt="" style="width: 95%; max-height: 750px;">
|
| 27 |
</p>
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## Metrics.
|
| 30 |
```
|
| 31 |
TrainOutput(global_step=2509,
|
|
|
|
| 58 |
## gradio colab.
|
| 59 |
<p align="center">
|
| 60 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/641b435ba5f876fe30c5ae0a/X2rf3Z7jJ2WUI7LANw4IH.png" alt="" style="width: 95%; max-height: 750px;">
|
| 61 |
+
</p>
|
| 62 |
+
|
| 63 |
+
## $ train
|
| 64 |
+
<p align="center">
|
| 65 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/641b435ba5f876fe30c5ae0a/tLhUyV2uW44-Cf0vwXFbd.png" alt="" style="width: 95%; max-height: 750px;">
|
| 66 |
</p>
|