Instructions to use Xtra-Computing/XtraGPT-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Xtra-Computing/XtraGPT-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Xtra-Computing/XtraGPT-1.5B") 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("Xtra-Computing/XtraGPT-1.5B") model = AutoModelForCausalLM.from_pretrained("Xtra-Computing/XtraGPT-1.5B", 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 Xtra-Computing/XtraGPT-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xtra-Computing/XtraGPT-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xtra-Computing/XtraGPT-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Xtra-Computing/XtraGPT-1.5B
- SGLang
How to use Xtra-Computing/XtraGPT-1.5B 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 "Xtra-Computing/XtraGPT-1.5B" \ --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": "Xtra-Computing/XtraGPT-1.5B", "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 "Xtra-Computing/XtraGPT-1.5B" \ --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": "Xtra-Computing/XtraGPT-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Xtra-Computing/XtraGPT-1.5B with Docker Model Runner:
docker model run hf.co/Xtra-Computing/XtraGPT-1.5B
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,63 +1,24 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: transformers
|
| 3 |
license: other
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
- generated_from_trainer
|
| 9 |
-
model-index:
|
| 10 |
-
- name: Qwen2.5-1.5B-Instruct-all-new
|
| 11 |
-
results: []
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
More information needed
|
| 26 |
-
|
| 27 |
-
## Intended uses & limitations
|
| 28 |
-
|
| 29 |
-
More information needed
|
| 30 |
-
|
| 31 |
-
## Training and evaluation data
|
| 32 |
-
|
| 33 |
-
More information needed
|
| 34 |
-
|
| 35 |
-
## Training procedure
|
| 36 |
-
|
| 37 |
-
### Training hyperparameters
|
| 38 |
-
|
| 39 |
-
The following hyperparameters were used during training:
|
| 40 |
-
- learning_rate: 1e-05
|
| 41 |
-
- train_batch_size: 1
|
| 42 |
-
- eval_batch_size: 1
|
| 43 |
-
- seed: 42
|
| 44 |
-
- distributed_type: multi-GPU
|
| 45 |
-
- num_devices: 4
|
| 46 |
-
- gradient_accumulation_steps: 4
|
| 47 |
-
- total_train_batch_size: 16
|
| 48 |
-
- total_eval_batch_size: 4
|
| 49 |
-
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 50 |
-
- lr_scheduler_type: cosine
|
| 51 |
-
- lr_scheduler_warmup_ratio: 0.1
|
| 52 |
-
- num_epochs: 2.0
|
| 53 |
-
|
| 54 |
-
### Training results
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
### Framework versions
|
| 59 |
-
|
| 60 |
-
- Transformers 4.48.3
|
| 61 |
-
- Pytorch 2.5.1+cu124
|
| 62 |
-
- Datasets 3.1.0
|
| 63 |
-
- Tokenizers 0.21.0
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: other
|
| 3 |
+
license_name: mg0-2.0
|
| 4 |
+
license_link: https://github.com/Xtra-Computing/ModelGo/blob/main/MG_licenses/V2/MG0-2.0.txt
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 9 |
tags:
|
| 10 |
+
- chat
|
| 11 |
+
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
+
```
|
| 15 |
+
@misc{chen2025xtragpt,
|
| 16 |
+
title={XtraGPT: LLMs for Human-AI Collaboration on Controllable Academic Paper Revision},
|
| 17 |
+
author={Nuo Chen and Andre Lin HuiKai and Jiaying Wu and Junyi Hou and Zining Zhang and Qian Wang and Xidong Wang and Bingsheng He},
|
| 18 |
+
year={2025},
|
| 19 |
+
eprint={2505.11336},
|
| 20 |
+
archivePrefix={arXiv},
|
| 21 |
+
primaryClass={cs.CL},
|
| 22 |
+
url={https://arxiv.org/abs/2505.11336},
|
| 23 |
+
}
|
| 24 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|