Instructions to use Kukedlc/NeuralExperiment-7b-MagicCoder-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kukedlc/NeuralExperiment-7b-MagicCoder-v5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kukedlc/NeuralExperiment-7b-MagicCoder-v5")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Kukedlc/NeuralExperiment-7b-MagicCoder-v5") model = AutoModelForCausalLM.from_pretrained("Kukedlc/NeuralExperiment-7b-MagicCoder-v5") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Kukedlc/NeuralExperiment-7b-MagicCoder-v5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kukedlc/NeuralExperiment-7b-MagicCoder-v5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kukedlc/NeuralExperiment-7b-MagicCoder-v5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Kukedlc/NeuralExperiment-7b-MagicCoder-v5
- SGLang
How to use Kukedlc/NeuralExperiment-7b-MagicCoder-v5 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 "Kukedlc/NeuralExperiment-7b-MagicCoder-v5" \ --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": "Kukedlc/NeuralExperiment-7b-MagicCoder-v5", "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 "Kukedlc/NeuralExperiment-7b-MagicCoder-v5" \ --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": "Kukedlc/NeuralExperiment-7b-MagicCoder-v5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Kukedlc/NeuralExperiment-7b-MagicCoder-v5 with Docker Model Runner:
docker model run hf.co/Kukedlc/NeuralExperiment-7b-MagicCoder-v5
Datacard for Custom Trained Model
- Base Model : Kukedlc/NeuralExperiment-7b-dare-ties
Model Description
This model is an experimental AI trained on three distinct datasets focusing on logical reasoning, mathematics, and programming. The training process involved fine-tuning from the last layer (31) backward with a gradually decreasing learning rate. The primary goal is to address and rectify the common 'INSTINST' bug observed in leaderboard models through targeted training on the latest layers.
Datasets Used for Training
microsoft/orca-math-word-problems-200k: A large-scale dataset of mathematical word problems aimed at enhancing the model's numerical reasoning and problem-solving capabilities.ise-uiuc/Magicoder-Evol-Instruct-110K: A dataset designed to improve code generation and understanding, contributing to the model's programming language proficiency.sahil2801/CodeAlpaca-20k: A dataset focused on programming challenges to further refine the model's coding and logical reasoning skills.
Each dataset contributed 20,000 data points to the training process, ensuring a balanced representation of logic, mathematics, and programming tasks.
Training Environment
- The model was trained on Kaggle's free GPU environment, allowing for cost-effective fine-tuning and experimentation.
- Users interested in replicating or extending this training can find the Kaggle notebook in my profile or request it directly for collaborative purposes.
Preliminary Results
- The model shows promising results in solving logical puzzles and mathematical problems, especially those with misleading or non-obvious solutions that it initially struggled with.
- Ongoing experiments aim to quantify the impact of targeted training on the model's reasoning capabilities across different domains.
Invitation for Collaboration
- Feedback, suggestions, and collaborative efforts are highly encouraged to further refine and evaluate the model.
- If interested in contributing or experimenting with this model, please feel free to reach out or access the code directly from my Kaggle profile.
Contact Information
- For any inquiries, suggestions, or collaboration proposals, please contact
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "Kukedlc/NeuralExperiment-7b-MagicCoder-v7"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
- Downloads last month
- 9
