Instructions to use Neuronovo/neuronovo-9B-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neuronovo/neuronovo-9B-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Neuronovo/neuronovo-9B-v0.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Neuronovo/neuronovo-9B-v0.1") model = AutoModelForCausalLM.from_pretrained("Neuronovo/neuronovo-9B-v0.1") 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 Neuronovo/neuronovo-9B-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Neuronovo/neuronovo-9B-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Neuronovo/neuronovo-9B-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Neuronovo/neuronovo-9B-v0.1
- SGLang
How to use Neuronovo/neuronovo-9B-v0.1 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 "Neuronovo/neuronovo-9B-v0.1" \ --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": "Neuronovo/neuronovo-9B-v0.1", "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 "Neuronovo/neuronovo-9B-v0.1" \ --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": "Neuronovo/neuronovo-9B-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Neuronovo/neuronovo-9B-v0.1 with Docker Model Runner:
docker model run hf.co/Neuronovo/neuronovo-9B-v0.1
The model described by the provided code, named "Neuronovo/neuronovo-9B-v0.1," is a sophisticated and fine-tuned version of a large language model, originally based on the "teknium/OpenHermes-2.5-Mistral-7B." This model exhibits several distinct characteristics and functionalities as derived from the code snippet:
Dataset and Preprocessing: It is trained on a dataset named "Intel/orca_dpo_pairs," which is likely a specialized dataset for dialogue systems. The data is preprocessed to format dialogues, with specific attention to system messages, user queries, chosen answers, and rejected answers.
Tokenizer: The model utilizes a tokenizer from the original "OpenHermes-2.5-Mistral-7B" model. This tokenizer is configured to have the end-of-sequence token as the padding token and pads from the left, indicating a particular focus on language generation tasks.
LoRA Configuration: The model employs a LoRA (Low-Rank Adaptation) configuration with specific parameters (r=16, lora_alpha=16, etc.) and targets multiple modules within the transformer architecture. This suggests an approach focused on efficient fine-tuning and adaptation of the model while preserving the majority of the pre-trained weights.
Fine-Tuning Specifications: The model is fine-tuned using a custom training setup, including a special DPO (Data Parallel Optimization) Trainer. This indicates an advanced fine-tuning process that likely emphasizes both efficiency and effectiveness, possibly with a focus on parallel processing and optimization.
Training Arguments: The training uses specific arguments like a cosine learning rate scheduler, paged AdamW optimizer, and training in 4-bit precision (indicating a focus on memory efficiency). It also employs gradient checkpointing and accumulation steps, which are typical in training large models efficiently.
Performance and Output: The model is configured for causal language modeling (indicative of generating text or continuing dialogues), with a maximum prompt length of 1024 and maximum generation length of 1536 tokens. This setup suggests its capability for handling extended dialogues or text generation tasks.
Special Features: The use of LoRA, DPO training, and specific fine-tuning methods highlight the model's advanced capabilities in adapting large-scale language models to specific tasks or datasets while maintaining computational efficiency.
In summary, "Neuronovo/neuronovo-9B-v0.1" is a highly specialized, efficient, and capable large language model fine-tuned for advanced language generation tasks, particularly in the context of dialogues or interactions, leveraging cutting-edge techniques in NLP model adaptation and training.
license: apache-2.0
- Downloads last month
- 32