Run this model with HF Jobs
Run vikp/reverse_instruct 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/vikp/reverse_instruct. 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/vikp/reverse_instruct 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/vikp/reverse_instruct. 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/vikp/reverse_instruct. 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 vikp/reverse_instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vikp/reverse_instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vikp/reverse_instruct", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vikp/reverse_instruct", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("vikp/reverse_instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vikp/reverse_instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vikp/reverse_instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vikp/reverse_instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vikp/reverse_instruct
- SGLang
How to use vikp/reverse_instruct 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 "vikp/reverse_instruct" \ --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": "vikp/reverse_instruct", "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 "vikp/reverse_instruct" \ --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": "vikp/reverse_instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vikp/reverse_instruct with Docker Model Runner:
docker model run hf.co/vikp/reverse_instruct
Update README.md
Browse files6 unmodified lines7891010111213141516171819203 unmodified lines24252622272829303 unmodified lines343536323738396 unmodified lines
It was trained across the [reverse-instruct](https://huggingface.co/vikp/reverse_instruct) dataset for 2 epochs. Final validation loss was .72, with rouge-l of .66 .
Here is an inference example, with some random text from falcon-refinedweb:Here is an inference example, with some random text from `falcon-refinedweb`:
```from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("vikp/reverse_instruct")tokenizer = AutoTokenizer.from_pretrained("vikp/reverse_instruct")
template = """Output
3 unmodified lines
""".lstrip()
text = "Many of the programmers, engineers and developers we talk to have a secret that they don't reveal until they know people pretty well. No, I'm not talking about the complete set of Star Wars playing cards they have stashed in the basement or the Rush LPs they haven't gotten around to trading in yet. I'm talking about Legos. You remember Legos, those infinitely malleable blocks that children around the world use to construct everything from tiny towers to life-size towers. Perhaps because these toys leave so much to the imagination, they've captured the imagination of a generation of tech workers. The appearance of Lego in Douglas Copeland's novel Microserfs, set on the Microsoft corporate campus, is one example of how pervasive it is."text = """SE3 Condenser Microphone from SE Electronics Sonic Distribution is now handling the SE Electronics line of imported studio condensers. The SE3 caught my eye at the Summer NAMM Show in Nashville and is their flagship "pencil" microphone with a fixed cardioid pattern and 48V phantom powering. This mic uses Class A FET amplifier electronics and has both low cut filter and -10dB pad switches. I had the opportunity to try this mic out on several sources while recording a band and was impressed by its natural sound and all around usefulness. I used it for acoustic guitar overdubs where the low cut filter helped to tame a jumbo bodied guitar's boomy sound. The gentle presence lift added a sparkle without using EQ. I also tried it on drums and cymbals and it (using the pad) didn't fold up (overload) at all. I even tried it on vocals with good results although it does 'pop' easily and required a couple of pop screens. Housed in an elegantly finished new body design, it comes with a sturdy shock mount and packaged in a deluxe wooden travel case. Significant specifications are: frequency response rated at 20Hz-20khz; sensitivity is 10mV/Pa +/- 2dB; noise level is 17dB (A weighted); and Max SPL for 0.5% THD @ 1kHz is 135dB. I certainly found a 'Swiss army knife' of a condenser with the SE3 and I completely recommend it for any studio task especially acoustic instruments such as guitar, violin, cello or string bass."""prompt = template.format(output=text)
inputs = tokenizer(prompt, return_tensors="pt")3 unmodified linesprint(texts)```
And the output instruction for the above example would be `What is a secret that many programmers, engineers and developers don't reveal until they know people pretty well?`And the output instruction for the above example would be: `Write a product review for the SE3 Condenser Microphone from SE Electronics Sonic Distribution.`
It works with code, too, although llama-7b is undertrained on code.README.md+8-3