Text Generation
Transformers
PyTorch
Safetensors
English
mistral
text-generation-inference
unsloth
trl
sft
Instructions to use Ramikan-BR/Mis3-7b-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ramikan-BR/Mis3-7b-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ramikan-BR/Mis3-7b-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ramikan-BR/Mis3-7b-v1") model = AutoModelForCausalLM.from_pretrained("Ramikan-BR/Mis3-7b-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Ramikan-BR/Mis3-7b-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ramikan-BR/Mis3-7b-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ramikan-BR/Mis3-7b-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ramikan-BR/Mis3-7b-v1
- SGLang
How to use Ramikan-BR/Mis3-7b-v1 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 "Ramikan-BR/Mis3-7b-v1" \ --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": "Ramikan-BR/Mis3-7b-v1", "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 "Ramikan-BR/Mis3-7b-v1" \ --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": "Ramikan-BR/Mis3-7b-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio new
How to use Ramikan-BR/Mis3-7b-v1 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ramikan-BR/Mis3-7b-v1 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ramikan-BR/Mis3-7b-v1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ramikan-BR/Mis3-7b-v1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ramikan-BR/Mis3-7b-v1", max_seq_length=2048, ) - Docker Model Runner
How to use Ramikan-BR/Mis3-7b-v1 with Docker Model Runner:
docker model run hf.co/Ramikan-BR/Mis3-7b-v1
<s> Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Input:
Write a code to create the snake game
### Output:
```python
import pygame
import random
# Initialize the pygame library
pygame.init()
# Set the width and height of the game window
width = 600
height = 600
# Set the title of the game window
pygame.display.set_caption("Snake Game")
# Create a white background surface
background = pygame.Surface((width, height))
background.fill((255, 255, 255))
# Create a snake object
snake = []
snake.append([width // 2, height // 2])
# Create a food object
food = [random.randint(0, width - 1), random.randint(0, height - 1)]
# Create a clock object to control the game speed
clock = pygame.time.Clock()
# Game loop
running = True
while running:
# Handle events
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Move the snake
keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT]:
snake.append([snake[-1][0] - 10, snake[-1][1]])
elif keys[pygame.K_RIGHT]:
snake.append([snake[-1][0] + 10, snake[-1][1]])
elif keys[pygame.K_UP]:
snake.append([snake[-1][0], snake[-1][1] - 10])
elif keys[pygame.K_DOWN]:
snake.append([snake[-1][0], snake[-1][1] + 10])
# Check if the snake has eaten the food
if snake[-1] == food:
food = [random.randint(0, width - 1), random.randint(0, height - 1)]
# Check if the snake has hit a wall or itself
if snake[-1][0] < 0 or snake[-1][0] >= width or snake[-1][1] < 0 or snake[-1][1] >= height or snake[-1] in snake[:-1]:
running = False
# Update the game window
pygame.display.update()
clock.tick(10)
# Quit the pygame library
pygame.quit()
```</s>
Uploaded model
- Developed by: Ramikan-BR
- License: apache-2.0
- Finetuned from model : unsloth/mistral-7b-v0.3-bnb-4bit
This mistral model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 3
