Text Generation
Transformers
Safetensors
English
gpt_neox
gpt
llm
large language model
h2o-llmstudio
text-generation-inference
Instructions to use diegomiranda/text-to-cypher with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use diegomiranda/text-to-cypher with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="diegomiranda/text-to-cypher")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("diegomiranda/text-to-cypher") model = AutoModelForCausalLM.from_pretrained("diegomiranda/text-to-cypher", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use diegomiranda/text-to-cypher with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "diegomiranda/text-to-cypher" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "diegomiranda/text-to-cypher", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/diegomiranda/text-to-cypher
- SGLang
How to use diegomiranda/text-to-cypher 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 "diegomiranda/text-to-cypher" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "diegomiranda/text-to-cypher", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "diegomiranda/text-to-cypher" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "diegomiranda/text-to-cypher", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use diegomiranda/text-to-cypher with Docker Model Runner:
docker model run hf.co/diegomiranda/text-to-cypher
Download cfg.yaml from diegomiranda/text-to-cypher: direct link, hf CLI and curl.
- Browser
- Download file 2.94 kB
-
https://huggingface.co/diegomiranda/text-to-cypher/resolve/main/cfg.yaml
- Command line
-
hf download hf://diegomiranda/text-to-cypher/cfg.yaml
-
curl -L -o cfg.yaml https://huggingface.co/diegomiranda/text-to-cypher/resolve/main/cfg.yaml
2.94 kB
| architecture: | |
| backbone_dtype: float16 | |
| force_embedding_gradients: false | |
| gradient_checkpointing: false | |
| intermediate_dropout: 0.0 | |
| pretrained: true | |
| pretrained_weights: '' | |
| augmentation: | |
| random_parent_probability: 0.0 | |
| skip_parent_probability: 0.0 | |
| token_mask_probability: 0.0 | |
| dataset: | |
| add_eos_token_to_answer: true | |
| add_eos_token_to_prompt: true | |
| add_eos_token_to_system: true | |
| answer_column: output | |
| chatbot_author: H2O.ai | |
| chatbot_name: h2oGPT | |
| data_sample: 1.0 | |
| data_sample_choice: | |
| - Train | |
| - Validation | |
| limit_chained_samples: false | |
| mask_prompt_labels: false | |
| parent_id_column: None | |
| personalize: false | |
| prompt_column: | |
| - instruction | |
| system_column: None | |
| text_answer_separator: '' | |
| text_prompt_start: '' | |
| text_system_start: <|system|> | |
| train_dataframe: /content/result.csv | |
| validation_dataframe: '' | |
| validation_size: 0.01 | |
| validation_strategy: automatic | |
| environment: | |
| compile_model: false | |
| find_unused_parameters: false | |
| gpus: | |
| - '0' | |
| huggingface_branch: main | |
| mixed_precision: true | |
| number_of_workers: 4 | |
| seed: 1 | |
| trust_remote_code: true | |
| use_fsdp: false | |
| experiment_name: fine_tuning_experiment | |
| llm_backbone: EleutherAI/pythia-70m-deduped-v0 | |
| logging: | |
| logger: None | |
| neptune_project: '' | |
| output_directory: /home/llm/projects/model-fine-tuned | |
| prediction: | |
| batch_size_inference: 0 | |
| do_sample: false | |
| max_length_inference: 500 | |
| metric: BLEU | |
| metric_gpt_model: gpt-3.5-turbo-0301 | |
| min_length_inference: 2 | |
| num_beams: 2 | |
| num_history: 4 | |
| repetition_penalty: 1.0 | |
| stop_tokens: '' | |
| temperature: 0.0 | |
| top_k: 0 | |
| top_p: 1.0 | |
| problem_type: text_causal_language_modeling | |
| tokenizer: | |
| add_prefix_space: false | |
| add_prompt_answer_tokens: false | |
| max_length: 512 | |
| max_length_answer: 256 | |
| max_length_prompt: 256 | |
| padding_quantile: 1.0 | |
| use_fast: true | |
| training: | |
| adaptive_kl_control: true | |
| advantages_gamma: 0.99 | |
| advantages_lambda: 0.95 | |
| batch_size: 4 | |
| differential_learning_rate: 1.0e-05 | |
| differential_learning_rate_layers: [] | |
| drop_last_batch: true | |
| epochs: 1 | |
| evaluate_before_training: false | |
| evaluation_epochs: 1.0 | |
| grad_accumulation: 1 | |
| gradient_clip: 0.0 | |
| initial_kl_coefficient: 0.2 | |
| kl_horizon: 10000 | |
| kl_target: 6.0 | |
| learning_rate: 0.0001 | |
| lora: true | |
| lora_alpha: 16 | |
| lora_dropout: 0.05 | |
| lora_r: 4 | |
| lora_target_modules: '' | |
| loss_function: CrossEntropy | |
| offload_reward_model: false | |
| optimizer: AdamW | |
| ppo_batch_size: 1 | |
| ppo_clip_policy: 0.2 | |
| ppo_clip_value: 0.2 | |
| ppo_epochs: 4 | |
| ppo_generate_temperature: 1.0 | |
| reward_model: OpenAssistant/reward-model-deberta-v3-large-v2 | |
| save_best_checkpoint: false | |
| scaling_factor_value_loss: 0.1 | |
| schedule: Cosine | |
| train_validation_data: false | |
| use_rlhf: false | |
| warmup_epochs: 0.0 | |
| weight_decay: 0.0 | |