Text Generation
Transformers
Safetensors
English
llama
cpu
aiframe
llm
coding
gpu
conversational
text-generation-inference
Run this model with HF Jobs
Run frameai/CodeLoxa-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/frameai/CodeLoxa-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/frameai/CodeLoxa-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/frameai/CodeLoxa-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/frameai/CodeLoxa-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use frameai/CodeLoxa-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use frameai/CodeLoxa-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="frameai/CodeLoxa-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("frameai/CodeLoxa-4B") model = AutoModelForCausalLM.from_pretrained("frameai/CodeLoxa-4B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use frameai/CodeLoxa-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "frameai/CodeLoxa-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "frameai/CodeLoxa-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/frameai/CodeLoxa-4B
- SGLang
How to use frameai/CodeLoxa-4B 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 "frameai/CodeLoxa-4B" \ --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": "frameai/CodeLoxa-4B", "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 "frameai/CodeLoxa-4B" \ --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": "frameai/CodeLoxa-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use frameai/CodeLoxa-4B with Docker Model Runner:
docker model run hf.co/frameai/CodeLoxa-4B
Update README.md
Browse files8 unmodified lines91011128 unmodified lineslicense: apache-2.0language:- en---8 unmodified lines9101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566678 unmodified lineslicense: apache-2.0language:- en---# CodeLoxa-4B: Your Private Coding Partner 💻## IntroductionWelcome to **CodeLoxa-4B**, a cutting-edge, compact code generation model designed to revolutionize your private coding projects. Built with an extensive dataset of high-quality code, CodeLoxa-4B delivers exceptional accuracy and efficiency, making it an indispensable asset for developers seeking a reliable coding assistant.## Key Features* **Optimized for Code Generation:** CodeLoxa-4B specializes in understanding and generating code, ensuring that your development process is faster and more streamlined.* **High Accuracy:** With a remarkable 96% accuracy rate, this model guarantees the generation of precise and reliable code, reducing the need for extensive debugging and revisions.* **Compact Size:** Designed with efficiency in mind, CodeLoxa-4B's small size makes it perfect for integration into various environments without the need for extensive computational resources.* **Private Project Focused:** This model is tailored for use in private projects, offering a secure and efficient coding solution that respects the confidentiality of your work.## PerformanceCodeLoxa-4B has been rigorously tested and optimized to achieve a **96% accuracy** in code generation tasks. This high level of precision ensures that the model can handle a wide range of coding challenges, providing developers with a powerful tool to enhance their productivity.## LicensingCodeLoxa-4B is available under a proprietary license. Please review the licensing terms to understand the usage rights and restrictions associated with this model. For detailed licensing information, please contact us at \[Your Contact Information].## Getting StartedTo start using CodeLoxa-4B in your projects, follow these simple steps:```pythonfrom transformers import pipelinegenerator = pipeline('text-generation', model='frameai/CodeLoxa-4B')text = generator("Write me a snake GUI game with points and loses metrics.", max_length=8192)print(text[0]['generated_text'])```## Example Applications* **Automating Repetitive Coding Tasks:** Quickly generate boilerplate code, freeing up developers to focus on more complex problems.* **Code Refactoring and Optimization:** Improve existing codebases by leveraging CodeLoxa-4B's ability to suggest more efficient code structures.* **Educational Tool:** Serve as an advanced learning aid for programmers, offering insights into coding best practices and syntax.## Support and ContactFor any questions, support requests, or feedback, please reach out to our support team at \manager@aiframe.org. We are always here to help you get the most out of CodeLoxa-4B.## ContributingWe welcome contributions from the community! If you're interested in helping improve CodeLoxa-4B, please refer to contribution guidelines.## AcknowledgmentsWe extend our gratitude to the open-source community and all contributors who have played a role in the development of CodeLoxa-4B.## DisclaimerCodeLoxa-4B is an AI-based code generation tool designed to assist with coding tasks. While it strives for high accuracy, users should review and test the generated code to ensure it meets their specific requirements and standards.
README.md+56-1