Text Generation
Transformers
PyTorch
mistral
conversational
text-generation-inference
4-bit precision
gptq
Instructions to use Shivam098/unstructured2structuredformat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Shivam098/unstructured2structuredformat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Shivam098/unstructured2structuredformat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Shivam098/unstructured2structuredformat") model = AutoModelForCausalLM.from_pretrained("Shivam098/unstructured2structuredformat") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Shivam098/unstructured2structuredformat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Shivam098/unstructured2structuredformat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shivam098/unstructured2structuredformat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Shivam098/unstructured2structuredformat
- SGLang
How to use Shivam098/unstructured2structuredformat 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 "Shivam098/unstructured2structuredformat" \ --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": "Shivam098/unstructured2structuredformat", "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 "Shivam098/unstructured2structuredformat" \ --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": "Shivam098/unstructured2structuredformat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Shivam098/unstructured2structuredformat with Docker Model Runner:
docker model run hf.co/Shivam098/unstructured2structuredformat
Upload MistralForCausalLM
Browse files- config.json +48 -0
- generation_config.json +6 -0
- pytorch_model.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "TheBloke/zephyr-7B-beta-GPTQ",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"MistralForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"hidden_act": "silu",
|
| 9 |
+
"hidden_size": 4096,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 14336,
|
| 12 |
+
"max_position_embeddings": 32768,
|
| 13 |
+
"model_type": "mistral",
|
| 14 |
+
"num_attention_heads": 32,
|
| 15 |
+
"num_hidden_layers": 32,
|
| 16 |
+
"num_key_value_heads": 8,
|
| 17 |
+
"pad_token_id": 2,
|
| 18 |
+
"pretraining_tp": 1,
|
| 19 |
+
"quantization_config": {
|
| 20 |
+
"batch_size": 1,
|
| 21 |
+
"bits": 4,
|
| 22 |
+
"block_name_to_quantize": "model.layers",
|
| 23 |
+
"damp_percent": 0.1,
|
| 24 |
+
"dataset": null,
|
| 25 |
+
"desc_act": true,
|
| 26 |
+
"disable_exllama": false,
|
| 27 |
+
"group_size": 128,
|
| 28 |
+
"max_input_length": null,
|
| 29 |
+
"model_seqlen": 4096,
|
| 30 |
+
"module_name_preceding_first_block": [
|
| 31 |
+
"model.embed_tokens"
|
| 32 |
+
],
|
| 33 |
+
"pad_token_id": null,
|
| 34 |
+
"quant_method": "gptq",
|
| 35 |
+
"sym": true,
|
| 36 |
+
"tokenizer": null,
|
| 37 |
+
"true_sequential": true,
|
| 38 |
+
"use_cuda_fp16": true
|
| 39 |
+
},
|
| 40 |
+
"rms_norm_eps": 1e-05,
|
| 41 |
+
"rope_theta": 10000.0,
|
| 42 |
+
"sliding_window": 4096,
|
| 43 |
+
"tie_word_embeddings": false,
|
| 44 |
+
"torch_dtype": "float16",
|
| 45 |
+
"transformers_version": "4.35.0.dev0",
|
| 46 |
+
"use_cache": true,
|
| 47 |
+
"vocab_size": 32000
|
| 48 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.35.0.dev0"
|
| 6 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9fbc422ebbd14ac8d7e8f94803cb7ead0c3d280a867eebabec9b69e9fc8c58ca
|
| 3 |
+
size 4158926548
|