Text Generation
Transformers
Safetensors
qwen2
code-generation
formal-verification
reinforcement-learning
dafny
conversational
text-generation-inference
Instructions to use Veri-Code/ReForm-SFT-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Veri-Code/ReForm-SFT-0.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Veri-Code/ReForm-SFT-0.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Veri-Code/ReForm-SFT-0.5B") model = AutoModelForCausalLM.from_pretrained("Veri-Code/ReForm-SFT-0.5B") 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 Veri-Code/ReForm-SFT-0.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Veri-Code/ReForm-SFT-0.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Veri-Code/ReForm-SFT-0.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Veri-Code/ReForm-SFT-0.5B
- SGLang
How to use Veri-Code/ReForm-SFT-0.5B 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 "Veri-Code/ReForm-SFT-0.5B" \ --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": "Veri-Code/ReForm-SFT-0.5B", "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 "Veri-Code/ReForm-SFT-0.5B" \ --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": "Veri-Code/ReForm-SFT-0.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Veri-Code/ReForm-SFT-0.5B with Docker Model Runner:
docker model run hf.co/Veri-Code/ReForm-SFT-0.5B
Improve model card for Re:Form: add metadata, links, and usage example
#1
by nielsr HF Staff - opened
This PR significantly enhances the model card for the Re:Form model by:
- Adding
pipeline_tag: text-generationandlibrary_name: transformersto the metadata, which improves discoverability and integration with the Hugging Face Hub features. - Including relevant tags such as
code-generation,formal-verification,reinforcement-learning, anddafnyfor better categorization. - Providing a concise model description summarizing the paper's abstract.
- Including the project page link (https://veri-code.github.io/ReForm-page) and updating the GitHub repository link to point to the main project repository (https://github.com/Veri-Code/Veri-Code).
- Adding the overall pipeline image from the project's GitHub repository for visual context.
- Providing a runnable Python code snippet to demonstrate basic usage with the
transformerslibrary for Dafny code generation. - Including the full BibTeX citation for proper academic attribution.
- Removing the unnecessary "File information" section to keep the model card clean and focused.
These updates greatly improve the model's documentation and user experience on the Hugging Face Hub.
SiniShell1 changed pull request status to merged