Text Generation
Transformers
Safetensors
Catalan
Spanish
English
llama
query-parsing
semantic-search
structured-output
json-generation
multilingual
catalan
spanish
LoRA
fine-tuned
AINA
R&D
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use SIRIS-Lab/impuls-salamandra-7b-query-parser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SIRIS-Lab/impuls-salamandra-7b-query-parser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SIRIS-Lab/impuls-salamandra-7b-query-parser") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SIRIS-Lab/impuls-salamandra-7b-query-parser") model = AutoModelForCausalLM.from_pretrained("SIRIS-Lab/impuls-salamandra-7b-query-parser", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SIRIS-Lab/impuls-salamandra-7b-query-parser with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SIRIS-Lab/impuls-salamandra-7b-query-parser" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SIRIS-Lab/impuls-salamandra-7b-query-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SIRIS-Lab/impuls-salamandra-7b-query-parser
- SGLang
How to use SIRIS-Lab/impuls-salamandra-7b-query-parser 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 "SIRIS-Lab/impuls-salamandra-7b-query-parser" \ --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": "SIRIS-Lab/impuls-salamandra-7b-query-parser", "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 "SIRIS-Lab/impuls-salamandra-7b-query-parser" \ --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": "SIRIS-Lab/impuls-salamandra-7b-query-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SIRIS-Lab/impuls-salamandra-7b-query-parser with Docker Model Runner:
docker model run hf.co/SIRIS-Lab/impuls-salamandra-7b-query-parser
File size: 520 Bytes
91261b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | {
"model": "langtech-innovation/7b-tools-v3",
"data": "data/training/impulse_training.jsonl",
"output_dir": "models/impulse-7b-tools-v3-ft",
"epochs": 5,
"batch_size": 1,
"gradient_accumulation_steps": 16,
"learning_rate": 0.0001,
"max_length": 4096,
"quantize": "4bit",
"warmup_steps": 100,
"lora_r": 16,
"lora_alpha": 32,
"lora_dropout": 0.05,
"eval_split": 0.1,
"seed": 42,
"use_wandb": false,
"early_stopping_patience": 3,
"eval_accumulation_steps": 4,
"skip_perplexity": true
} |