Skip to main content

Medium Models (8.1B-20B Parameters)

Our medium-sized models offer enhanced capabilities and specialized features. With 8.1B to 20B parameters, these models provide superior performance for specific use cases while maintaining reasonable resource requirements.

Available Models

Qwen-14B

  • Parameters: 14B
  • Context Window: 8192 tokens
  • Provider: Alibaba Cloud
  • License: Apache 2.0
  • Key Features:
    • Strong multilingual capabilities
    • Advanced reasoning
    • Knowledge integration
    • Technical understanding

DeepSeek Math 14B

  • Parameters: 14B
  • Context Window: 4096 tokens
  • Provider: DeepSeek AI
  • License: Apache 2.0
  • Key Features:
    • Mathematical specialization
    • Step-by-step solutions
    • Formula understanding
    • Scientific computation

Configuration & Setup

OpenAI SDK Setup

import OpenAI from 'openai';

const openai = new OpenAI({
apiKey: 'your-neuredge-key',
baseURL: 'https://api.neuredge.dev/v1/'
});

Native SDK Setup

import { Neuredge } from '@neuredge/sdk';

const neuredge = new Neuredge({
apiKey: 'your-api-key'
});

Real-World Applications & Examples

1. Advanced Mathematical Problem Solving

Step-by-Step Math Solutions

const response = await openai.chat.completions.create({
model: '@cf/deepseek-math-7b-instruct',
messages: [
{
role: 'system',
content: 'You are a mathematics tutor. Provide clear, step-by-step solutions.'
},
{
role: 'user',
content: \`Solve this calculus problem:
Find the volume of the solid obtained by rotating the region bounded by
y =, y = 2x, and x = 0 about the x-axis.\`
}
],
temperature: 0.3,
max_tokens: 800
});

Use Cases:

  • Math education
  • Engineering calculations
  • Scientific computing
  • Research analysis
  • Statistical modeling

2. Multilingual Content Creation

Global Marketing Content

const response = await openai.chat.completions.create({
model: '@cf/qwen/qwen1.5-14b-chat-awq',
messages: [
{
role: 'system',
content: 'You are a multilingual marketing expert. Create culturally appropriate content.'
},
{
role: 'user',
content: \`Create product descriptions for a luxury watch in:
1. English (US market)
2. Chinese (mainland China market)
3. Japanese (Japan market)
Focus on cultural preferences and market-specific value propositions.\`
}
],
temperature: 0.7,
max_tokens: 1000
});

Use Cases:

  • International marketing
  • Localization
  • Cultural adaptation
  • Global communications
  • Multilingual documentation

3. Technical Documentation & Analysis

API Documentation Generator

const response = await openai.chat.completions.create({
model: '@cf/qwen/qwen1.5-14b-chat-awq',
messages: [
{
role: 'system',
content: 'Generate comprehensive API documentation with examples and best practices.'
},
{
role: 'user',
content: \`Create documentation for this GraphQL API schema:
${schemaDefinition}
Include:
- Field descriptions
- Usage examples
- Common queries
- Error handling\`
}
],
temperature: 0.4,
max_tokens: 1500
});

Use Cases:

  • Technical writing
  • API documentation
  • System specifications
  • Architecture documents
  • Implementation guides

4. Scientific Research Assistance

Research Analysis

const response = await openai.chat.completions.create({
model: '@cf/deepseek-math-7b-instruct',
messages: [
{
role: 'system',
content: 'You are a research assistant analyzing scientific papers and data.'
},
{
role: 'user',
content: \`Analyze this dataset and research hypothesis:
${experimentData}
Provide:
1. Statistical analysis
2. Correlation findings
3. Potential implications
4. Suggested next steps\`
}
],
temperature: 0.4,
max_tokens: 1000
});

Use Cases:

  • Data analysis
  • Research synthesis
  • Experimental design
  • Statistical review
  • Methodology planning

Integration Examples

Flask Research Application

from flask import Flask, request, jsonify
from openai import OpenAI

app = Flask(__name__)
client = OpenAI(
api_key='your-neuredge-key',
base_url='https://api.neuredge.dev/v1/'
)

@app.route('/analyze-research', methods=['POST'])
def analyze_research():
try:
data = request.json
response = client.chat.completions.create(
model='@cf/deepseek-math-7b-instruct',
messages=[
{
'role': 'system',
'content': 'Analyze research data and provide insights.'
},
{
'role': 'user',
'content': f"Analyze this research data:\n{data['content']}"
}
],
temperature=0.4
)

return jsonify({
'analysis': response.choices[0].message.content,
'usage': response.usage
})
except Exception as e:
return jsonify({'error': str(e)}), 500

Next.js Multilingual Content Generator

// pages/api/generate-content.js
import { OpenAIStream, StreamingTextResponse } from 'ai';
import OpenAI from 'openai';

const openai = new OpenAI({
apiKey: process.env.NEUREDGE_API_KEY,
baseURL: 'https://api.neuredge.dev/v1/'
});

export default async function handler(req, res) {
const { content, languages } = await req.json();

const response = await openai.chat.completions.create({
model: '@cf/qwen/qwen1.5-14b-chat-awq',
messages: [
{
role: 'system',
content: 'Translate and adapt content for different markets.'
},
{
role: 'user',
content: `Content: ${content}\nTarget languages: ${languages.join(', ')}`
}
],
stream: true
});

const stream = OpenAIStream(response);
return new StreamingTextResponse(stream);
}

Best Practices

  1. Task-Specific Optimization

    • Use DeepSeek Math for mathematical/scientific tasks
    • Choose Qwen for multilingual/technical content
    • Adjust temperature based on task precision needs
    • Implement proper context handling
  2. Performance Management

    • Cache complex computations
    • Use streaming for long outputs
    • Implement timeout handling
    • Monitor resource usage
  3. Quality Control

    • Validate mathematical results
    • Verify translations
    • Review technical accuracy
    • Implement feedback loops

Token Management

PlanMonthly Token Quota
Free Tier150K tokens
$29 Plan1.5M tokens
$49 Plan2.25M tokens

When to Use

Ideal For:

  • Mathematical computations
  • Scientific research
  • Technical documentation
  • Multilingual content
  • Complex analysis

Consider Alternatives When:

  • Basic text generation needed
  • Speed is critical
  • Limited budget
  • Simple queries suffice

Getting Started

To begin using our medium models: