Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
sft
trl
json
information-extraction
conversational
text-generation-inference
Instructions to use talha2134/StructuraAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use talha2134/StructuraAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="talha2134/StructuraAI") 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("talha2134/StructuraAI") model = AutoModelForCausalLM.from_pretrained("talha2134/StructuraAI", 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 talha2134/StructuraAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "talha2134/StructuraAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "talha2134/StructuraAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/talha2134/StructuraAI
- SGLang
How to use talha2134/StructuraAI 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 "talha2134/StructuraAI" \ --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": "talha2134/StructuraAI", "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 "talha2134/StructuraAI" \ --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": "talha2134/StructuraAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use talha2134/StructuraAI with Docker Model Runner:
docker model run hf.co/talha2134/StructuraAI
|
Download README.md from talha2134/StructuraAI: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/talha2134/StructuraAI/resolve/main/README.md
- Command line
-
hf download hf://talha2134/StructuraAI/README.md
-
curl -L -o README.md https://huggingface.co/talha2134/StructuraAI/resolve/main/README.md
1.96 kB
| base_model: Qwen/Qwen3-0.6B | |
| library_name: transformers | |
| model_name: StructuraAI | |
| tags: | |
| - generated_from_trainer | |
| - sft | |
| - trl | |
| - json | |
| - information-extraction | |
| - text-generation | |
| # StructuraAI | |
| StructuraAI is a fine-tuned language model based on | |
| Qwen3-0.6B. It is designed to automatically extract | |
| structured information from unstructured and messy text | |
| and return the extracted information as JSON. | |
| Unlike conventional extraction systems that require | |
| explicit instructions for every request, StructuraAI | |
| aims to identify available information automatically. | |
| ## Features | |
| - Automatic information extraction. | |
| - Converts unstructured text into JSON. | |
| - Extracts only information explicitly mentioned. | |
| - Omits attributes that are not present in the input. | |
| - Avoids intentionally inferring missing information. | |
| ## Example | |
| ### Input | |
| Ahmed is 22 years old and works at Google as an AI | |
| Engineer for 3 years. | |
| ### Output | |
| ```json | |
| { | |
| "name": "Ahmed", | |
| "age": 22, | |
| "company": "Google", | |
| "designation": "AI Engineer", | |
| "experience": 3 | |
| } | |
| ``` | |
| ## Base Model | |
| Qwen/Qwen3-0.6B | |
| ## Training Procedure | |
| This model was fine-tuned using Supervised Fine-Tuning | |
| (SFT) with the TRL library. | |
| The training dataset consists of synthetically generated | |
| examples designed for information extraction from | |
| unstructured text. | |
| ## Intended Use | |
| StructuraAI is intended for: | |
| - Information extraction. | |
| - Converting messy text into structured JSON. | |
| - Preparing unstructured data for downstream applications. | |
| - Prototyping automated data-processing workflows. | |
| ## Limitations | |
| - The model may occasionally generate invalid JSON. | |
| - It may confuse attributes with similar meanings. | |
| - Extraction accuracy depends on the wording and quality | |
| of the input. | |
| - Outputs should be validated before production use. | |
| ## Frameworks | |
| - Transformers | |
| - TRL | |
| - PyTorch | |
| - Hugging Face Datasets | |
| ## Acknowledgements | |
| Built upon Qwen3-0.6B and trained using the Hugging Face | |
| TRL ecosystem. | |