Text Generation
Transformers
Safetensors
Russian
qwen3
mining
conversational
text-generation-inference
Instructions to use nn-tech/MetalGPT-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nn-tech/MetalGPT-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nn-tech/MetalGPT-1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nn-tech/MetalGPT-1") model = AutoModelForCausalLM.from_pretrained("nn-tech/MetalGPT-1") 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 nn-tech/MetalGPT-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nn-tech/MetalGPT-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nn-tech/MetalGPT-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nn-tech/MetalGPT-1
- SGLang
How to use nn-tech/MetalGPT-1 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 "nn-tech/MetalGPT-1" \ --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": "nn-tech/MetalGPT-1", "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 "nn-tech/MetalGPT-1" \ --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": "nn-tech/MetalGPT-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nn-tech/MetalGPT-1 with Docker Model Runner:
docker model run hf.co/nn-tech/MetalGPT-1
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
## Description
|
| 2 |
|
| 3 |
-
**MetalGPT-1** is a model built upon the Qwen3-
|
| 4 |
|
| 5 |
---
|
| 6 |
|
|
@@ -43,7 +57,7 @@ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
|
| 43 |
|
| 44 |
generated_ids = model.generate(
|
| 45 |
**model_inputs,
|
| 46 |
-
max_new_tokens=
|
| 47 |
)
|
| 48 |
|
| 49 |
# Обрезаем префикс промпта
|
|
@@ -132,7 +146,7 @@ sampling_params = SamplingParams(
|
|
| 132 |
repetition_penalty=1.05,
|
| 133 |
top_p=0.8,
|
| 134 |
top_k=70,
|
| 135 |
-
max_tokens=
|
| 136 |
)
|
| 137 |
|
| 138 |
prompt = (
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-generation
|
| 3 |
+
library_name: transformers
|
| 4 |
+
tags:
|
| 5 |
+
- mining
|
| 6 |
+
- russian
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
datasets:
|
| 9 |
+
- nn-tech/Alloy-Bench
|
| 10 |
+
language:
|
| 11 |
+
- ru
|
| 12 |
+
base_model: Qwen/Qwen3-32B
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
## Description
|
| 16 |
|
| 17 |
+
**MetalGPT-1** is a model built upon the Qwen/Qwen3-32B and incorporates both continual pre-training and supervised fine-tuning.
|
| 18 |
|
| 19 |
---
|
| 20 |
|
|
|
|
| 57 |
|
| 58 |
generated_ids = model.generate(
|
| 59 |
**model_inputs,
|
| 60 |
+
max_new_tokens=2048,
|
| 61 |
)
|
| 62 |
|
| 63 |
# Обрезаем префикс промпта
|
|
|
|
| 146 |
repetition_penalty=1.05,
|
| 147 |
top_p=0.8,
|
| 148 |
top_k=70,
|
| 149 |
+
max_tokens=2048,
|
| 150 |
)
|
| 151 |
|
| 152 |
prompt = (
|