Text Generation
Transformers
Safetensors
English
qwen2
DeepSeek
R1
SFT
Qwen
JSON
Unstructured
Structured
conversational
text-generation-inference
Instructions to use MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured") model = AutoModelForCausalLM.from_pretrained("MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured
- SGLang
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured 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 "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured" \ --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": "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured", "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 "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured" \ --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": "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured with Docker Model Runner:
docker model run hf.co/MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
MasterControl
|
| 2 |
---
|
| 3 |
|
| 4 |
-
# MasterControlAIML R1-Qwen2.5-1.5b SFT R1 JSON Unstructured-To-Structured
|
| 5 |
|
| 6 |
[](https://github.com/unslothai/unsloth)
|
| 7 |
|
|
@@ -77,7 +77,7 @@ The Unsloth library allows you to quickly load and run inference with the model.
|
|
| 77 |
from unsloth import FastLanguageModel
|
| 78 |
import torch
|
| 79 |
|
| 80 |
-
MODEL = "MasterControlAIML/R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured
|
| 81 |
|
| 82 |
# Load model and tokenizer
|
| 83 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
|
@@ -99,7 +99,7 @@ Below is an instruction that describes a task, paired with an input that provide
|
|
| 99 |
"""
|
| 100 |
|
| 101 |
# Example instruction and prompt
|
| 102 |
-
instruction = "
|
| 103 |
prompt = ALPACA_PROMPT.format(instruction, "")
|
| 104 |
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
|
| 105 |
output = model.generate(**inputs, max_new_tokens=2000)
|
|
@@ -118,7 +118,7 @@ Alternatively, you can use Hugging Face's Transformers directly:
|
|
| 118 |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
|
| 119 |
import torch
|
| 120 |
|
| 121 |
-
MODEL = "MasterControlAIML/R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured
|
| 122 |
|
| 123 |
# Initialize tokenizer and model
|
| 124 |
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
|
@@ -132,7 +132,7 @@ Below is an instruction that describes a task, paired with an input that provide
|
|
| 132 |
{}
|
| 133 |
"""
|
| 134 |
|
| 135 |
-
TEXT = "
|
| 136 |
prompt = ALPACA_PROMPT.format(TEXT, "")
|
| 137 |
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
|
| 138 |
text_streamer = TextStreamer(tokenizer)
|
|
|
|
| 1 |
MasterControl
|
| 2 |
---
|
| 3 |
|
| 4 |
+
# MasterControlAIML R1-Qwen2.5-1.5b SFT R1 JSON Unstructured-To-Structured Model
|
| 5 |
|
| 6 |
[](https://github.com/unslothai/unsloth)
|
| 7 |
|
|
|
|
| 77 |
from unsloth import FastLanguageModel
|
| 78 |
import torch
|
| 79 |
|
| 80 |
+
MODEL = "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured"
|
| 81 |
|
| 82 |
# Load model and tokenizer
|
| 83 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
|
|
|
| 99 |
"""
|
| 100 |
|
| 101 |
# Example instruction and prompt
|
| 102 |
+
instruction = "" (see examples below)
|
| 103 |
prompt = ALPACA_PROMPT.format(instruction, "")
|
| 104 |
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
|
| 105 |
output = model.generate(**inputs, max_new_tokens=2000)
|
|
|
|
| 118 |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
|
| 119 |
import torch
|
| 120 |
|
| 121 |
+
MODEL = "MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured"
|
| 122 |
|
| 123 |
# Initialize tokenizer and model
|
| 124 |
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
|
|
|
| 132 |
{}
|
| 133 |
"""
|
| 134 |
|
| 135 |
+
TEXT = ""(see examples below)
|
| 136 |
prompt = ALPACA_PROMPT.format(TEXT, "")
|
| 137 |
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
|
| 138 |
text_streamer = TextStreamer(tokenizer)
|