Text Generation
Transformers
Safetensors
qwen3
jarvis
ollama
agent
conversational
text-generation-inference
Instructions to use hadadrjt/JARVIS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hadadrjt/JARVIS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hadadrjt/JARVIS", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hadadrjt/JARVIS") model = AutoModelForCausalLM.from_pretrained("hadadrjt/JARVIS", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hadadrjt/JARVIS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hadadrjt/JARVIS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hadadrjt/JARVIS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hadadrjt/JARVIS
- SGLang
How to use hadadrjt/JARVIS 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 "hadadrjt/JARVIS" \ --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": "hadadrjt/JARVIS", "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 "hadadrjt/JARVIS" \ --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": "hadadrjt/JARVIS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hadadrjt/JARVIS with Docker Model Runner:
docker model run hf.co/hadadrjt/JARVIS
J.A.R.V.I.S.: Release OpenAI-Compatible API for Next-Gen. [API 2/2]
Browse files
README.md
CHANGED
|
@@ -150,22 +150,32 @@ For **developers**, an OpenAI-compatible API is available, facilitating seamless
|
|
| 150 |
</video>
|
| 151 |
|
| 152 |
```bash
|
| 153 |
-
# OpenAI
|
| 154 |
-
curl https://hadadrjt-api.hf.space/v1/
|
| 155 |
-H "Content-Type: application/json" \
|
| 156 |
-d '{
|
| 157 |
-
"model": "
|
| 158 |
-
"
|
|
|
|
|
|
|
| 159 |
"stream": true
|
| 160 |
}'
|
| 161 |
```
|
| 162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
```
|
| 164 |
# Endpoint
|
| 165 |
https://hadadrjt-api.hf.space/v1
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
```
|
| 167 |
|
| 168 |
-
<div style="font-size: x-small; font-weight: bold;">Please note:
|
| 169 |
|
| 170 |
## Responsible Use
|
| 171 |
|
|
|
|
| 150 |
</video>
|
| 151 |
|
| 152 |
```bash
|
| 153 |
+
# OpenAI-Compatible API (developers only)
|
| 154 |
+
curl -X POST https://hadadrjt-api.hf.space/v1/chat/completions \
|
| 155 |
-H "Content-Type: application/json" \
|
| 156 |
-d '{
|
| 157 |
+
"model": "Q8_K_XL",
|
| 158 |
+
"messages": [
|
| 159 |
+
{"role": "user", "content": "Hello, who are you?"}
|
| 160 |
+
],
|
| 161 |
"stream": true
|
| 162 |
}'
|
| 163 |
```
|
| 164 |
|
| 165 |
+
<video src="https://gitlab.com/hdrjt/assets/-/raw/master/videos/JARVIS_next.mp4" controls>
|
| 166 |
+
Your browser does not support the video tag.
|
| 167 |
+
</video>
|
| 168 |
+
|
| 169 |
```
|
| 170 |
# Endpoint
|
| 171 |
https://hadadrjt-api.hf.space/v1
|
| 172 |
+
|
| 173 |
+
# Next-Gen provides support for tools and function calling.
|
| 174 |
+
# Because this is free, without any cost, rate limits for access,
|
| 175 |
+
# or a queue system and temporary sessions will apply
|
| 176 |
```
|
| 177 |
|
| 178 |
+
<div style="font-size: x-small; font-weight: bold;">Please note: Audio and Image generation as well as Deep Search are not available for the OpenAI-Compatible API.</div>
|
| 179 |
|
| 180 |
## Responsible Use
|
| 181 |
|