Model Details

This model is a mixed gguf q2ks format of Qwen/Qwen3-30B-A3B-Instruct-2507 generated by intel/auto-round algorithm. Embedding layer and lm-head layer are fallback to 8 bits and non expert layers are fallback to 4 bits. Please refer to Section Generate the model for more details.

Please follow the license of the original model.

How To Use

Llamacpp inference

/llama-cli -hf Intel/Qwen3-30B-A3B-Instruct-2507-gguf-q2ks-mixed-AutoRound --conversation
> code flappy bird in python
Here's a simple implementation of **Flappy Bird** in Python using the `pygame` library. This version uses basic physics and user input (space bar to flap), with a single pipe obstacle.

### ✅ Requirements:
Install `pygame` if you haven't already:
```bash
pip install pygame
```

---

### 🐱 Flappy Bird Game Code (Python)

```python
import pygame
import random
import sys

# Initialize pygame
pygame.init()

# Screen dimensions
WIDTH, HEIGHT = 400, 600
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Flappy Bird")

# Colors
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GREEN = (0, 128, 0)

# Game settings
GRAVITY = 0.1
FLAP_POWER = -10
PIPE_SPEED = 3
PIPE_GAP = 150  # Gap between top and bottom pipes
PIPE_FREQUENCY = 150  # How often pipes appear

# Load images (optional - you can use simple rectangles instead)
# For simplicity, we'll use rectangles
bird_img = pygame.Surface((30, 30))
bird_img.fill(GREEN)  # Green rectangle as bird

# Font
font = pygame.font.SysFont("Arial", 30)

# Clock for framerate control
clock = pygame.time.Clock()


# Player bird
class Bird:
    def __init__(self):
        self.x = 50
        self.y = HEIGHT // 2
        self.width = 30
        self.height = 30
        self.vel = 0

    def flap(self):
        self.vel = FLAP_POWER

    def update(self):
        self.y += self.vel
        self.vel += GRAVITY

    def draw(self):
        screen.blit(bird_img, (self.x, self.y))

    def get_rect(self):
        return pygame.Rect(self.x, self.y, self.width, self.height)

# Pipe class
class Pipe:
    def __init__(self):
        self.x = WIDTH
        self.top_height = random.randint(50, HEIGHT - 100)
        self.bottom_height = self.top_height + PIPE_GAP
        self.width = 50

    def update(self):
        self.x -= PIPE_SPEED

    def draw(self):
        # Draw top pipe
        pygame.draw.rect(screen, GREEN, (self.x, 0, self.width, self.top_height))
        # Draw bottom pipe
        pygame.draw.rect(screen, GREEN, (self.x, self.bottom_height, self.width, HEIGHT - self.bottom_height))

    def get_rects(self):
        top_rect = pygame.Rect(self.x, 0, self.width, self.top_height)
        bottom_rect = pygame.Rect(self.x, self.bottom_height, self.width, HEIGHT - self.bottom_height)
        return top_rect, bottom_rect

    def is_off_screen(self):
        return self.x + self.width < 0

# Game state
def main():
    bird = Bird()
    pipes = []
    score = 0
    game_over = False

    # Main game loop
    while True:
        # Handle events
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                sys.exit()
            if event.type == pygame.KEYDOWN and event.key == pygame.K_SPACE:
                if not game_over:
                    bird.flap()
                else:
                    # Restart game
                    bird = Bird()
                    pipes = []
                    score = 0
                    game_over = False

        if game_over:
            # Display game over screen
           # Display game over screen
            text = font.render(f"Score: {score}", True, BLACK)
            text_rect = text.get_rect(center=(WIDTH // 2, HEIGHT // 2))
            screen.blit(text, text_rect)
            restart_text = font.render("Press SPACE to restart", True, BLACK)
            restart_rect = restart_text.get_rect(center=(WIDTH // 2, HEIGHT // 2 + 40))
            screen.blit(restart_text, restart_rect)
            pygame.display.update()
            continue

        # Update game state
        bird.update()

        # Generate pipes
        if random.randint(1, 100) < PIPE_FREQUENCY:
            pipes.append(Pipe())

        # Update pipes
        for pipe in pipes:
            pipe.update()
            if pipe.is_off_screen():
                pipes.remove(pipe)

        # Check collisions
        # Bird hit ground or ceiling
        if bird.y < 0 or bird.y + bird.height > HEIGHT:
            game_over = True

        # Bird hit pipe
        for pipe in pipes:
            top_rect, bottom_rect = pipe.get_rects()
            if bird.get_rect().colliderect(top_rect) or bird.get_rect().colliderect(bottom_rect):
                game_over = True

        # Score increase when passing a pipe
        for pipe in pipes:
            if pipe.x + pipe.width < bird.x and not pipe.x + pipe.width < 0:
                # Check if bird passed this pipe
                score += 1

        # Draw everything
        screen.fill(WHITE)

        # Draw pipes
        for pipe in pipes:
            pipe.draw()

        # Draw bird
        bird.draw()

        # Draw score
        score_text = font.render(f"Score: {score}", True, BLACK)
        screen.blit(score_text, (10, 10))

        # Update screen
        pygame.display.update()
        clock.tick(60)

# Run the game
if __name__ == "__main__":
    main()
```

---

### 🎮 How to Play:
- Press **SPACE** to flap and make the bird jump.
- Avoid hitting pipes or the ground/ceiling.
- Score increases when you pass a pipe.
- Game ends when you collide with anything.
- Press **SPACE** again to restart after game over.

---

### 🚀 Optional Improvements:
- Add sound effects (flap, collision).
- Use actual images (bird png, pipe sprites).
- Add smooth animations.
- Add background image (sky).

---

Let me know if you'd like a version with **sprites**, **sound**, or **better graphics**! 🎨🚀


Generate the model

Here is the sample command to reproduce the model

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from auto_round import AutoRound

model_name = "Qwen/Qwen3-30B-A3B-Instruct-2507"

model = AutoModelForCausalLM.from_pretrained(model_name,
                                             device_map="cpu", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
layer_config = {}
for n, m in model.named_modules():
    if n == "lm_head" or isinstance(m,torch.nn.Embedding):
        layer_config[n] = {"bits": 8}
    elif isinstance(m, torch.nn.Linear) and (not "expert" in n or "shared_experts" in n) and n != "lm_head":
        layer_config[n] = {"bits": 4}

autoround = AutoRound(model, tokenizer, iters=0, layer_config=layer_config, nsamples=512)
autoround.quantize_and_save("/data5/wenhuach/Qwen3-30B-A3B-Instruct-2507-q2ks", format="gguf:q2_k_s")

Ethical Considerations and Limitations

The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.

Therefore, before deploying any applications of the model, developers should perform safety testing.

Caveats and Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.

Here are a couple of useful links to learn more about Intel's AI software:

  • Intel Neural Compressor link

Disclaimer

The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.

Cite

@article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }

arxiv github

Downloads last month
1,791
GGUF
Model size
30.5B params
Architecture
qwen3moe
Hardware compatibility
Log In to view the estimation

2-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Intel/Qwen3-30B-A3B-Instruct-2507-gguf-q2ks-mixed-AutoRound

Quantized
(88)
this model