Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use abcorrea/struct-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abcorrea/struct-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abcorrea/struct-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abcorrea/struct-v1") model = AutoModelForCausalLM.from_pretrained("abcorrea/struct-v1") 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 abcorrea/struct-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abcorrea/struct-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": "abcorrea/struct-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abcorrea/struct-v1
- SGLang
How to use abcorrea/struct-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 "abcorrea/struct-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": "abcorrea/struct-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 "abcorrea/struct-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": "abcorrea/struct-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abcorrea/struct-v1 with Docker Model Runner:
docker model run hf.co/abcorrea/struct-v1
abcorrea/struct-v1
Browse files- adapter_config.json +4 -4
- adapter_model.safetensors +1 -1
- tokenizer_config.json +1 -1
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -28,13 +28,13 @@
|
|
| 28 |
"rank_pattern": {},
|
| 29 |
"revision": null,
|
| 30 |
"target_modules": [
|
| 31 |
-
"gate_proj",
|
| 32 |
-
"up_proj",
|
| 33 |
"q_proj",
|
|
|
|
| 34 |
"v_proj",
|
|
|
|
|
|
|
| 35 |
"down_proj",
|
| 36 |
-
"
|
| 37 |
-
"o_proj"
|
| 38 |
],
|
| 39 |
"task_type": "CAUSAL_LM",
|
| 40 |
"trainable_token_indices": null,
|
|
|
|
| 28 |
"rank_pattern": {},
|
| 29 |
"revision": null,
|
| 30 |
"target_modules": [
|
|
|
|
|
|
|
| 31 |
"q_proj",
|
| 32 |
+
"k_proj",
|
| 33 |
"v_proj",
|
| 34 |
+
"up_proj",
|
| 35 |
+
"o_proj",
|
| 36 |
"down_proj",
|
| 37 |
+
"gate_proj"
|
|
|
|
| 38 |
],
|
| 39 |
"task_type": "CAUSAL_LM",
|
| 40 |
"trainable_token_indices": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1688012760
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdddf540b862327c5f9c0c059ae55d1169580dd8d194871d3b57025d42aea4c6
|
| 3 |
size 1688012760
|
tokenizer_config.json
CHANGED
|
@@ -231,7 +231,7 @@
|
|
| 231 |
"eos_token": "<|im_end|>",
|
| 232 |
"errors": "replace",
|
| 233 |
"extra_special_tokens": {},
|
| 234 |
-
"model_max_length":
|
| 235 |
"pad_token": "<|endoftext|>",
|
| 236 |
"split_special_tokens": false,
|
| 237 |
"tokenizer_class": "Qwen2Tokenizer",
|
|
|
|
| 231 |
"eos_token": "<|im_end|>",
|
| 232 |
"errors": "replace",
|
| 233 |
"extra_special_tokens": {},
|
| 234 |
+
"model_max_length": 262144,
|
| 235 |
"pad_token": "<|endoftext|>",
|
| 236 |
"split_special_tokens": false,
|
| 237 |
"tokenizer_class": "Qwen2Tokenizer",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6161
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fef92124b4eaa801581b5f0ac6ec1adeb12b35802780e0b143713d9be088386e
|
| 3 |
size 6161
|